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

Disable Insert New Item

3 Answers 223 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Burke
Top achievements
Rank 1
Burke asked on 11 Jun 2009, 06:15 PM
How do you disable inserting new items into the grid?

3 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 12 Jun 2009, 05:18 AM
Hi Thomas,

There are two properties that allow you to disable the insertion of new items. The first one, called IsReadOnly, will disable any modification of the grid data, including insertion of new items. The second one is CanUserInsertRows, which only controls the insertion behavior. If set to false you will not be able to insert new rows, but  you will be able to edit cells, etc.

Greetings,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Burke
Top achievements
Rank 1
answered on 12 Jun 2009, 03:39 PM
I must be missing something very obvious, but CanUserInsertRows is not a property on the gridview itself is it?  I can't seem to find it.  I don't want the entire grid to be read-only, I just want to stop the user from being able to insert rows by hitting the "Insert" key.
0
Milan
Telerik team
answered on 15 Jun 2009, 06:16 AM
Hello Thomas,

The property CanUserInsertRows is defined on GridViewDataControl . The RadGridView inherits from GridViewDataControl so you should be able to use that property when dealing with both RadGridView and GridViewDataControl.

When you set CanUserInsertRows to false the users will not be allowed to create new rows but they will be able to edit the existing ones.

Best wishes,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Burke
Top achievements
Rank 1
Answers by
Milan
Telerik team
Burke
Top achievements
Rank 1
Share this question
or