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

Anyway to hide a delete column?

1 Answer 106 Views
Grid
This is a migrated thread and some comments may be shown as answers.
SultanOfSuede
Top achievements
Rank 1
SultanOfSuede asked on 16 Mar 2009, 02:41 PM
I've used AutoGenerateDeleteColumn="false" to hide a delete hyperlink column in the past, but this was on a master table.  The same doesn't work for a detail table that is nested inside a master table. 

Is there a way to hide this delete column that keeps showing up?  I'm doing my binding in code for the detail table.

Ian
 

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 17 Mar 2009, 05:16 AM
Hello Ian,

You can try out the following code to hide the autogenerateddeletecolumn from showing up in the detail table:
cs:
protected void RadGrid2_PreRender(object sender, EventArgs e) 
    { 
      foreach (GridDataItem dataItem in RadGrid2.MasterTableView.Items) 
        { 
           if (dataItem.Expanded) 
            {                
                GridTableView nestedView = (GridTableView)dataItem.ChildItem.NestedTableViews[0]; 
                  foreach (GridDataItem item in nestedView.Items) 
                    { 
                        item["AutoGeneratedDeleteColumn"].Visible = false;                       
                    } 
            } 
        } 
    }  

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