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

[Solved] Add new row when editing

3 Answers 133 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.
xiaofeng
Top achievements
Rank 1
xiaofeng asked on 29 Sep 2009, 03:13 AM
I need two things when I press enter key:
1.If the row of  the cell editing is not the last row,the current cell will be the one below.
2.if the row of the cell editing is the last row,the grid will add a new row.
What can I do?
Thanks.

3 Answers, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 01 Oct 2009, 03:42 PM
Hi xiaofeng,

Unfortunately current version of the RadGridView control does not support this functionality out of the box.
We plan to introduce such functionality, but I cannot commit with any specific date or release. As soon as this feature is available we will make it public via latest internal build program (or official release), so stay tuned.

Meanwhile you can handle RadGridView.KeyDown event and take following actions on Enter key:
1. Make next (desired) cell current.
2. Call RadGridView.BeginEdit().
3. In the last row case call RadGridView.BeginInsert() before step 1.

Greetings,
Nedyalko Nikolov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
xiaofeng
Top achievements
Rank 1
answered on 08 Oct 2009, 12:57 PM
When excuting BeginInsert() method,two rows will be inserted.But I only want to insert one row.why?
0
Nedyalko Nikolov
Telerik team
answered on 08 Oct 2009, 03:52 PM
Hello xiaofeng,

There was such an issue in our control, but it is already fixed.
Please try it with the assemblies from the latest internal build.

All the best,
Nedyalko Nikolov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
xiaofeng
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
xiaofeng
Top achievements
Rank 1
Share this question
or