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

Change radgriview readonly property for specific row

1 Answer 193 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Nadina
Top achievements
Rank 1
Nadina asked on 05 Aug 2013, 10:35 AM
Is there any way to change the IsReadOnly column property for just the InsertRow that is being created?
I am using the RadGridView control to enter data (e.g. line items in a shopping cart). The first column is the part number, a keyed entry in the underlying data schema. The column is defined as a readonly column because a user cannot change the part number in the grid once it has been committed to the database. But when the program executes the BeginInsert method to allow data entry for a new grid line item, the column for just the insert row must allow for data entry so that the part number can be entered. If I change the column to IsReadOnly = False during the AddingNewDataItem event that changes all grid rows; not just the new insert row that has not yet been committed.

1 Answer, 1 is accepted

Sort by
0
Vera
Telerik team
answered on 05 Aug 2013, 01:08 PM
Hello Nadina,

What you can do is to set Column's IsReadOnly property to false in AddingNewDataItem event and to set it back to true in RowEditEnded event. This way after the new row is committed, the column will become read-only again.

I hope this helps. Let us know in case you experience any problems.


Regards,
Vera
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
Nadina
Top achievements
Rank 1
Answers by
Vera
Telerik team
Share this question
or