how to get child datagrid control id

W

Waheed Khan

By reading Scotts article
http://aspnet.4guysfromrolla.com/articles/122602-1.aspx I haved
downloaded Andy's RowSelectorConlumn Control, and am using in a Nested
DataGrid. But some how i cannot find ChildControl ID in Button Click
event. Does any one know how i'm going to get the child grid control
id
Thanks


private void Button1_Click(object sender, System.EventArgs e)
{

RowSelectorColumn rsc =
RowSelectorColumn.FindColumn(((DataGrid)FindControl("ChildGrid")));

Message.Text = "Total selected rows in grid = " +
rsc.SelectedIndexes.Length.ToString() + "<br>";

foreach( Int32 selectedIndex in rsc.SelectedIndexes )

{

Message.Text += selectedIndex.ToString() + "<br>";

}

}
 

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,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top