6 Answers, 1 is accepted
0
Hello thibaut,
Kind regards,
Milan
the Telerik team
Could you please provide more information about the exception that you are getting? There might be a better way to handle it than subscribing to events of the new row.
Kind regards,
Milan
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Thibaut
Top achievements
Rank 1
answered on 28 Jun 2010, 01:45 PM
- I have a ragridview binding an observable collection of items.
I need to facilitate to add new items to my users. For this, I have added a button "insert" in my control, I have set ShowInsertRow to true and I use too the MouseDoubleClick event to add a new item to my collection.
Thats Ok except when I click on the row "Click here to add a new item"... - More generaly, I am not sure to use the ShowInsertRow option. I would prefer a new blank row at bottom, always visible. A new empty row should appear immediately after the insert of the object into the collection.
I didn't find anything about that in the Public Isssue Tracking System.
0
Hello thibaut,
Kind regards,
Milan
the Telerik team
If you are binding to an ObservableCollection and ShowInsertRow is false, new blank row should be added at the bottom of the grid when Insert key is pressed.
I have attached a sample project which demonstrates this approach.
Kind regards,
Milan
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Thibaut
Top achievements
Rank 1
answered on 28 Jun 2010, 02:09 PM
- I'm sorry there's a misunderstanding. I want to multiply the ability to add a new item to my users.
I use both button "insert", ShowInsertRow=true and MouseDoubleClick event.
MouseDoubleClick event adds a item but doubleclicking on the row "Click here ..." throws an exception - ?...
0
Hello thibaut,
Best wishes,
Milan
the Telerik team
Could you please send us your project so that we can take a look at the exception and offer a solution.
Thank you for your cooperation.
Best wishes,
Milan
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Thibaut
Top achievements
Rank 1
answered on 29 Jun 2010, 02:33 PM
It is a re-entry exception. I fixed it by checking
if (radGridView1.RowInEditMode != null && radGridView1.RowInEditMode is GridViewNewRow)
if (radGridView1.RowInEditMode != null && radGridView1.RowInEditMode is GridViewNewRow)