This is a migrated thread and some comments may be shown as answers.

[Solved] getting detailtable in button click

1 Answer 119 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
nagi
Top achievements
Rank 1
nagi asked on 13 Jun 2008, 04:32 AM
Hi Telerik Team ,
I am having button and rad grid with check boxes in master and detail tables  similar to the below link .
http://www.telerik.com/demos/aspnet/Grid/Examples/Hierarchy/TwoTablesAtLevel/DefaultCS.aspx . In the button click event i am getting the checked item by using a foreach loop as shown in the below code .

protected

void btnUpdateSearch_Click(object sender, EventArgs e)
{

foreach

(GridDataItem gridDataItem in (GridDataItemCollection)SearchUsersGrid.Items)
{
checkForNorecords =
true;
CheckBox chkSelect = gridDataItem["CheckBoxTemplateColumn"].FindControl("chkboxSelectRows") as CheckBox;
if (chkSelect.Checked)// If cheked then maintain the same in MpaList and UserStatus list.
{
gridDataItem.Selected =
true; 
}
}
}
My question is how to find the checked data items in the Details table and how to check the data items in the details table .

Awaiting for your reply.

Thanks and Regards,
Nagireddy T

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 16 Jun 2008, 12:30 PM
Hello nagi,

Based on the setup which you have described, you can use the gridDataItem.ChildItem.NestedTableViews collection, to access the detail tables. The Items collection for each detail table will hold all the data items for the relevant nested item.

Regards,
Yavor
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Scheduler
Asked by
nagi
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or