I have a hierarchical grid similar to the demo as Customer > Orders. The DetailTables "Orders" has a gridboundcolumn (A) for viewing data and a griddropdowncolumn (B) that only is visible in edit mode and bind to another SqlDataSource. How to hide the gridboundcolumn (A) in edit mode?
(B) works fine.
The test is similar to this demo: http://demos.telerik.com/ASPNET/Prometheus/Grid/Examples/DataEditing/ThreeLevel/DefaultCS.aspx
I tried to do this but it still does not work:
(B) works fine.
The test is similar to this demo: http://demos.telerik.com/ASPNET/Prometheus/Grid/Examples/DataEditing/ThreeLevel/DefaultCS.aspx
I tried to do this but it still does not work:
protected void radgridAccount_ItemCreated(object sender, GridItemEventArgs e)
{
if (e.Item.OwnerTableView.Name == "Orders")
{
if (e.Item is GridEditableItem && e.Item.IsInEditMode)
{GridEditableItem item = e.Item as GridEditableItem;
if (item.IsInEditMode)
{
//either these lines
this.radgridAccount.MasterTableView.DetailTables[0].Columns[1].Visible = false;this.radgridAccount.MasterTableView.DetailTables[0].Columns[2].Visible = false;
//or these lines
Item["A"].Controls[0].Visible = false;
item["B"].Controls[0].Visible = true;
}}}}
Thanks.
d-cpt