View Single Post
  #12 (permalink)  
Old 08-03-2007, 05:03 AM
garunprasad garunprasad is offline
D-Web Trainee
 
Join Date: Mar 2007
Location: Chennai
Posts: 45
garunprasad is on a distinguished road
Send a message via ICQ to garunprasad Send a message via AIM to garunprasad Send a message via MSN to garunprasad Send a message via Yahoo to garunprasad Send a message via Skype™ to garunprasad
Question Re: Implementation Data Controls in asp.net

Hi all
How can I add a checkbox to each row of a GridView dynamically? I realise that this can be done by using <ItemTemplate></ItemTemplate> in the aspx page, but I'm trying to have columns in the GridView corresponding to different datasets.
//--
foreach (DataColumn dc in ds.Tables[0].Columns)
{
BoundField bField = new BoundField();
bField.HeaderText = dc.ColumnName;
bField.DataField = dc.ColumnName;
GridView1.Columns.Add(bField);
}
//--
I want a checkbox appended to each of the rows in the Gridview as well. How can I do that? Any pointers would be appreciated.

Thanks
__________________
G.A.P
Reply With Quote