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

Allow edit if new column, and readonly if existing using entityframework

1 Answer 71 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Reyas
Top achievements
Rank 2
Reyas asked on 22 Jan 2014, 11:03 AM
Hello,

I am using Radgridview, and there is a situation.
The gridview is binded to Observablecollection of Entity framework class.
I need to make some of the columns (2-4) readonly if the grid is in edit mode.
If adding new row, the columns should be editable.
I am using telerik:RadGridViewCommands.BeginInsert to add new row.

Note: MVVM pattern is followed.

Regards,
Reyas Mohammed

1 Answer, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 27 Jan 2014, 11:41 AM
Hi Reyas,

In order to achieve your goal, you can use  BeginningEdit and RowEditEnded events of RadGridView. I have prepared a sample project showing you the approach.

I hope this helps.

Regards,
Yoan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
Reyas
Top achievements
Rank 2
Answers by
Yoan
Telerik team
Share this question
or