943,815 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 712
  • ASP.NET RSS
Oct 6th, 2008
0

GridView Fields Visible

Expand Post »
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>
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
IT_Techno is offline Offline
41 posts
since Dec 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: how to generate a chart using ASP.NET
Next Thread in ASP.NET Forum Timeline: Fragment caching





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC