GridView Fields Visible

Reply

Join Date: Dec 2007
Posts: 41
Reputation: IT_Techno is an unknown quantity at this point 
Solved Threads: 0
IT_Techno IT_Techno is offline Offline
Light Poster

GridView Fields Visible

 
0
  #1
Oct 6th, 2008
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>
<aspqlDataSource 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>
<asparameter Name="Customer_ID" />
<asparameter Name="Customer_Desc" />
<asparameter Name="Case_ID" />
</UpdateParameters>
<SelectParameters>
<asparameter Name="Customer_ID" />
</SelectParameters>
</aspqlDataSource>
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP.NET Forum


Views: 619 | Replies: 0
Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC