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

All rows are expandible except the first row

1 Answer 13 Views
Grid
This is a migrated thread and some comments may be shown as answers.
taeho
Top achievements
Rank 1
taeho asked on 18 May 2010, 04:29 AM
Hi there,

What is the property to disable expanding capability for a specific row?
For instance, I want to display managers (mastertable) and their staff (details table) but if a manager doesn't have staff, I would like to disable that row's expanding capability.

Tom
+ Mark
   - Jennie
   - Jim
+ Greg
   - John
   - Steve
Frank

etc.

Many thanks

Toby

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 18 May 2010, 05:23 AM
Hello Taeho,

 One suggestion to disable expanding capability is by disabling the expand/collapse button based on condition from code behind. The following code illustrates on how to perform that.



C#:

 protected
 void RadGrid1_PreRender(object sender, EventArgs e) 
    { 
        foreach (GridDataItem item in RadGrid1.MasterTableView.Items) 
        { 
            if ()//your condition 
            { 
                TableCell cell = item["ExpandColumn"]; 
                cell.Enabled = false
            } 
        } 
    } 

Regards,
Shinu.



Tags
Grid
Asked by
taeho
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or