Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamically adding a column of checkboxes to a datagrid.

Status
Not open for further replies.

JaBurd311

MIS
Sep 21, 2001
24
0
0
US
I have been able to successfuly add a new template column to a DataGrid on my page. However I am having trouble getting a checkbox to display in the newly created column. Is this even possible? Below is the code I am using to add the column.

While dr.Read
Dim NewColumn As New TemplateColumn

'Create a new column to add to the datagrid

NewColumn.HeaderText = dr.Item("FileName")
NewColumn.Visible = True
NewCheckBox.ID = dr.Item("FileID")

dgEmails.Columns.Add(NewColumn)
End While

dgEmails.DataSource = dv
dgEmails.DataBind()

Thanks in advance.

Jason
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top