Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
i had a table of data to fill the grideview with editable of one column which needs to be update the database.
Posted

Whats the issue? All you have to do is design your ItemTemplate/EditTemplate accordingly.

You must be using 'AutoGenerateColumns' property as true. It will limit your control to what will be visible in grid and how it will behave. Set it to false and then define your columns. Convert column fields into template field and then design your grid to display as per your need.

A TemplateField object enables you to specify templates that contain markup and controls to customize the layout and behavior of a column in a GridView control. Using an ItemTemplate, you can specify the layout to be used when the GridView displays data in a column.

Read all about it here:
MSDN: Using TemplateFields in the GridView Control[^]
MSDN: Creating a Custom Column in a GridView Web Server Control[^]
MSDN: TemplateField.ItemTemplate Property[^]
 
Share this answer
 
Comments
sravani.v 8-May-12 8:06am    
My 5!
Sandeep Mewara 8-May-12 9:17am    
Thanks.
Monjurul Habib 8-May-12 16:39pm    
5!
 
Share this answer
 
Comments
Sandeep Mewara 8-May-12 9:18am    
Good links. 5!
sravani.v 8-May-12 23:36pm    
Thank you Sandeep
Monjurul Habib 8-May-12 16:39pm    
5!
sravani.v 8-May-12 23:36pm    
Thank you Habib
Prasad_Kulkarni 9-May-12 0:54am    
Good Links!
+5!

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