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

hide a column in insert mode

1 Answer 8 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Erin
Top achievements
Rank 1
Erin asked on 27 Nov 2013, 12:57 PM
Hi,
How to hide a column in insert mode but show in edit mode. Using ReadOnly property i cant get in edit mode. Any idea.?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 27 Nov 2013, 01:02 PM
Hi Erin,

Please try the following code snippet.

C#:
protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
  if (e.Item is GridEditFormInsertItem && e.Item.OwnerTableView.IsItemInserted)
  {
      GridEditFormInsertItem insertitem = (GridEditFormInsertItem)e.Item;
      insertitem["ColumnUniqueName"].Parent.Visible = false;
  }
}

Thanks,
Shinu
Tags
Grid
Asked by
Erin
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or