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

Disabled the Grid in Detail Table

1 Answer 84 Views
Grid
This is a migrated thread and some comments may be shown as answers.
leesam
Top achievements
Rank 1
leesam asked on 18 Jul 2011, 06:08 PM
Can you someone helps to show me how to disabled the grid if it's in the Detail Table of a Main Grid? I need to develop an App that required this feature. I know we need to use Grid Client API to work on it, but not sure how to write the javascript code. 

I've include the picture showed the Grid in Detail Table of the master Grid. If user click on the checkbox on the Master Grid, Grid in Detail Table should be ENABLED.

Thank you.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 19 Jul 2011, 07:37 AM
Hello Leesam,

Try the following code snippet in CheckChanged event of the CheckBox to enable the grid in detailtable.
C#:
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
       CheckBox chk = sender as CheckBox;
       GridDataItem dataItem = (GridDataItem)chk.NamingContainer;
       CheckBox chkbox = (CheckBox)(dataItem).FindControl("checkbox");
       GridTableView tablview = (GridTableView)(dataItem).ChildItem.NestedTableViews[0];
       if (chk.Checked)
       {
           tableview.Enabled = true;
           tableview.Rebind();
       }       
}

Thanks,
Princy.
Tags
Grid
Asked by
leesam
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or