TemplateColumn

T

Thomas

Using C# code I would like to find out the Controls a
user places in a TemplateColumn. Is there a way to loop
through all the items in a TemplateColumn? Thanks.
 
T

Teemu Keiski

Well,

you can loop through all DataGrid's Items and in every item you can access
the column (basically cell in this matter).

foreach(DataGridItem item in DataGrid1.Items)
{
//Find control in cell 0(basically column at index 0)
Control c=item.Cells[0].FindControl("ID");
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top