hi
i have gridview with invisible Case_ID DataField when i try to edit any row in gridview it doenot edit if the Case_ID DataField is invisible but it worke well if i make it visible
this is the code can some body helpe me please:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="Customer_ID"
DataSourceID="SqlDataSource1">
<Columns>
<asp:CommandField ShowEditButton="True" ShowSelectButton="True" />
<asp:BoundField DataField="Customer_ID" HeaderText="Customer_ID" ReadOnly="True"
SortExpression="Customer_ID" />
<asp:BoundField DataField="Case_ID" HeaderText="Case_ID" SortExpression="Case_ID" Visible="false"/>
<asp:BoundField DataField="Customer_Name" HeaderText="Customer_Name" SortExpression="Customer_Name" />
<asp:BoundField DataField="Customer_Desc" HeaderText="Customer_Desc" SortExpression="Customer_Desc" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:LegalConnectionString %>"
SelectCommand="SELECT Customer_ID, Case_ID, Customer_Name, Customer_Desc FROM CustomersInfo WHERE (Customer_ID = @Customer_ID) AND (Case_ID = Case_ID)"
UpdateCommand="UPDATE CustomersInfo SET Customer_ID =, Case_ID =, Customer_Name = @Customer_ID, Customer_Desc = @Customer_Desc WHERE (Case_ID = @Case_ID) AND (Customer_ID = @Customer_ID)">
<UpdateParameters>
<asp:Parameter Name="Customer_ID" />
<asp:Parameter Name="Customer_Desc" />
<asp:Parameter Name="Case_ID" />
</UpdateParameters>
<SelectParameters>
<asp:Parameter Name="Customer_ID" />
</SelectParameters>
</asp:SqlDataSource>