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

Column Editable only in Insert Mode

2 Answers 49 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Stefano
Top achievements
Rank 1
Stefano asked on 27 Mar 2012, 02:48 PM
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 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 27 Mar 2012, 03:00 PM
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 >>
0
Stefano
Top achievements
Rank 1
answered on 27 Mar 2012, 03:38 PM
It works!

Thanks.
Stefano
Tags
GridView
Asked by
Stefano
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Stefano
Top achievements
Rank 1
Share this question
or