Click here to Skip to main content
15,916,600 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to edit and update gridview row.but i have 3 column like-id,name address.i want edit only name,address..plz help me?
Posted

There are ways to do this:
1) Create a hidden or invisible column and bind it with ID, it won't be available for edit
2) You can even do the same thing by using DataKeys.
ASP.NET
<asp:gridview runat="server" id="grid1" datakeynames="ID" xmlns:asp="#unknown">
<!-- Your code here -->
</asp:gridview>

See below article:
How_to_edit_and_Delete_records_in_a_gridview_using_datakeys[^]
 
Share this answer
 
Please follow the link, Make readonly to Column ID

Implementing Cumulative total and Select All functionality with Events in ASP.NET GridView[^]


Thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900