Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
i had a table of data to fill the grideview with editable of one column which needs to be update the database.
Posted 8-May-12 0:31am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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[^]
  Permalink  
Comments
sravani.v at 8-May-12 8:06am
   
My 5!
Sandeep Mewara at 8-May-12 9:17am
   
Thanks.
Monjurul Habib at 8-May-12 16:39pm
   
5!
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  
Comments
Sandeep Mewara at 8-May-12 9:18am
   
Good links. 5!
sravani.v at 8-May-12 23:36pm
   
Thank you Sandeep
Monjurul Habib at 8-May-12 16:39pm
   
5!
sravani.v at 8-May-12 23:36pm
   
Thank you Habib
Prasad_Kulkarni at 9-May-12 0:54am
   
Good Links!
+5!
sravani.v at 9-May-12 1:09am
   
Thank you Prasad

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

  Print Answers RSS
0 OriginalGriff 375
1 Sergey Alexandrovich Kryukov 195
2 Prakriti Goyal 177
3 jlopez788 134
4 Kruti Joshi 117
0 OriginalGriff 6,742
1 Sergey Alexandrovich Kryukov 5,479
2 Maciej Los 3,474
3 Peter Leow 3,313
4 DamithSL 2,505


Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 8 May 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100