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
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