Column Editable only in Insert Mode

3 posts, 0 answers
  1. Stefano
    Stefano avatar
    2 posts
    Member since:
    Feb 2012

    Posted 27 Mar 2012 Link to this post

    Hi,
    I need to make a column of my RadGridView editable only when I add a new row and leave it disabled in Edit inline mode. How can I do it?

    thanks,

    Stefano
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 27 Mar 2012 Link to this post

    Hi Stefano,

    You can achieve this behaviour by using an Attribute. First you need to reference the DataAnotations assembly:

    using System.ComponentModel.DataAnnotations;

    Then set the attribute for data bound to the column. For example:
    [Editable(false, AllowInitialValue = true) ]
           public string Name
           {...
            }

    All the best,
    Didie
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. Stefano
    Stefano avatar
    2 posts
    Member since:
    Feb 2012

    Posted 27 Mar 2012 Link to this post

    It works!

    Thanks.
    Stefano
Back to Top