NUmericColumn

2 posts, 1 answers
  1. Tina
    Tina avatar
    130 posts
    Member since:
    Jul 2011

    Posted 30 Oct 2011 Link to this post

    I want to make GridNumericColumn ReaOnly in edit mode.How can I do this?
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 30 Oct 2011 Link to this post

    Hello Tina,

    Try the following code snippet in ItemDataBound event.
    C#:
    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
      if (e.Item is GridEditableItem && e.Item.IsInEditMode)
      {
          GridEditableItem item = (GridEditableItem)e.Item;
          RadNumericTextBox txt=(RadNumericTextBox)item["NumericColumn"].Controls[0];
          txt.ReadOnly = true;
      }
    }

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top