M
mor
I got a label control which is dynamically created inside the
headerTemplate of template column.
And it is part of the datagrid.
Please teach me how to read the content of that label control?
I cannot use FindControl() function because it is created in runtime
based on variable.
And everytime the number of columns is different.
I can access a textbox control in itemTemplate with following code
(dgassignment is the datagrid)
dim i as integer
dim j as integer
dim textboxhour as textbox
dim dgi as datagriditem
for i = 0 to dgassignment.items.count -1
dgi = dgassignment.items(i)
for j = 0 to dgi.cells.count -1
textboxhour = ctype(dgi.cells(j).controls(0), textbox)
next j
next i
But I have no idea how to get the control in header, please help,
thanks.
headerTemplate of template column.
And it is part of the datagrid.
Please teach me how to read the content of that label control?
I cannot use FindControl() function because it is created in runtime
based on variable.
And everytime the number of columns is different.
I can access a textbox control in itemTemplate with following code
(dgassignment is the datagrid)
dim i as integer
dim j as integer
dim textboxhour as textbox
dim dgi as datagriditem
for i = 0 to dgassignment.items.count -1
dgi = dgassignment.items(i)
for j = 0 to dgi.cells.count -1
textboxhour = ctype(dgi.cells(j).controls(0), textbox)
next j
next i
But I have no idea how to get the control in header, please help,
thanks.