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

Disable the expansion button on the Hierarchy grid

1 Answer 148 Views
Grid
This is a migrated thread and some comments may be shown as answers.
RJ
Top achievements
Rank 1
RJ asked on 21 Jan 2011, 06:09 PM

Is there anyway to disable the Hierarchy grid expansion button based on one of the the master table fields.

Thanks

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 24 Jan 2011, 08:33 AM
Hello,

You can set the Enabled property to false, after accessing the ExpandCollapse button. Here is the sample code.

C#:
protected void cmbLocation_ItemDataBound(object sender, RadComboBoxItemEventArgs e)
{
          Button button1 = (Button)item["ExpandColumn"].Controls[0];
          (btn.Parent as GridTableCell).Enabled = false;
          //  (button1 .Parent as GridTableCell).Controls.Clear(); For hiding the expand/collapse button 
 }

Thanks,
shinu.
Tags
Grid
Asked by
RJ
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or