4 Answers, 1 is accepted
0

Princy
Top achievements
Rank 2
answered on 23 May 2011, 01:07 PM
Hello Abhinav,
Try the following code snippet to hide edit column after inserting the item. Hope this helps you.
C#:
Thanks,
Princy.
Try the following code snippet to hide edit column after inserting the item. Hope this helps you.
C#:
protected
void
RadGrid1_InsertCommand(
object
sender, GridCommandEventArgs e)
{
GridColumn col = (GridColumn)RadGrid1.MasterTableView.GetColumn(
"AutoGeneratedEditColumn"
);
col.Visible =
false
;
}
Thanks,
Princy.
0

abinav
Top achievements
Rank 1
answered on 23 May 2011, 05:21 PM
hi princy
i tried this
but got an error stating cannot find a column with uniquename AutoGeneratedEditColumn
instead i tried it in prerender event but the editcolumn is not visible while loading itself how to check whether it is in edit mode or not in prerender event
i tried this
GridColumn col = (GridColumn)RadGrid1.MasterTableView.GetColumn(
"AutoGeneratedEditColumn"
)
but got an error stating cannot find a column with uniquename AutoGeneratedEditColumn
instead i tried it in prerender event but the editcolumn is not visible while loading itself how to check whether it is in edit mode or not in prerender event
0

Princy
Top achievements
Rank 2
answered on 24 May 2011, 08:27 AM
Hello Abhinav,
If you are using AutoGeneratedEditColumn, then ColumnUniqueName is "AutoGeneratedEditColumn". If you are using GridEditCommandColumn or GridButtonColumn with CommandName "Edit", then you can access the column by setting the UniqueName property. Please elaborate your scenario if it doesn't help.
Thanks,
Princy.
If you are using AutoGeneratedEditColumn, then ColumnUniqueName is "AutoGeneratedEditColumn". If you are using GridEditCommandColumn or GridButtonColumn with CommandName "Edit", then you can access the column by setting the UniqueName property. Please elaborate your scenario if it doesn't help.
Thanks,
Princy.
0

abinav
Top achievements
Rank 1
answered on 24 May 2011, 11:03 AM
hi princy
thanks a lot i tried the following
radgrid1.Columns[2].Visible = false; and it partially solves the problem
thanks a lot i tried the following
radgrid1.Columns[2].Visible = false; and it partially solves the problem