Subject: gridview sql proc parameters
Posted By: rlb Post Date: 1/22/2007 1:15:57 PM
Hello,

I have a gridview that takes data from three different tables, each with its own key, and uses a custom sql procedure to update the gridview. Code looks like this:

 <asp:GridView ID="resultsGridview"  Runat="server"
        DataKeyNames="LIC_ID" ... >
        <Columns>
          <asp:BoundField HeaderText="Group" DataField="GROUP_NAME" SortExpression="GROUP_NAME"  />
          <asp:BoundField HeaderText="S_ID" DataField="SOFTWARE_ID" SortExpression="SOFTWARE_ID"  Visible=false />
          <asp:BoundField HeaderText="M_ID" DataField="MAN_ID" SortExpression="MAN_ID"  Visible=false />
          <asp:BoundField HeaderText="Manufacturer" DataField="M_NAME" SortExpression="M_NAME" />
          <asp:BoundField HeaderText="Software Title" DataField="S_NAME" SortExpression="S_NAME" />

             ...


I don't want the user to see (nor edit) the M_ID or S_ID fields. But I need these two parameters to be passed to my sql stored procedure that handles the update.

How do I do it?
Reply By: rlb Reply Date: 1/24/2007 11:52:09 AM
Okay, fixed my problem.
If I remember right, you cant edit fields in your gridview from merged tables and have them update correctly.
Instead, you use a SQL procedure for your update command.

Go to topic 55304

Return to index page 54
Return to index page 53
Return to index page 52
Return to index page 51
Return to index page 50
Return to index page 49
Return to index page 48
Return to index page 47
Return to index page 46
Return to index page 45