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

ComboBox issue in Hierarchical grid Display mode

1 Answer 36 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark Kelly
Top achievements
Rank 1
Mark Kelly asked on 04 Nov 2010, 03:39 AM
Hi, I am trying to create a hierarchical grid. I have a radCombobox in the parent grid and the details grid and I want that combobox to be editable when the grid is in Display Mode. When grid is collapsed, the parent grid's combobox is editable, but when I expand any of the rows, it disables the combobox. Also in the detail view the combobox is disabled.
I want the users to be able to select a value in the combobox and update the database with it, both at the parent and child level in the hierarchical grid, with grid being in display mode. Is that possible. Thanks

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 04 Nov 2010, 10:10 AM
Hello Mark,

I guess you want to disable the RadComboBox in MasterTable when expanding the grid row. If so you can try the following code snippet in PreRender event.
 
C#:
protected void RadGrid1_PreRender(object sender, EventArgs e)
   {
       foreach(GridDataItem item in RadGrid1.MasterTableView.Items )
       {
           RadComboBox combo = (RadComboBox)item.FindControl("RadComboBox1"); access RadComboBox in MasterTable
           combo.Enabled = !item.Expanded;
       }
  }

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