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

[Solved] Bug flushing data to object in GridView

2 Answers 100 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.
Seth
Top achievements
Rank 1
Seth asked on 12 Jun 2009, 06:46 PM
Using the Telerik GridView I enter in some data (I'm using DataMemberPath for binding) leaving my cursor in the GridView at the end of the line I just entered.  I click the save button on my form but it appears as though the data is never flushed to the underlying object.  If I repeat the steps and this time tab out of the line I enter, the data saves correctly.

Thanks,
Seth Mims

2 Answers, 1 is accepted

Sort by
0
Accepted
Rossen Hristov
Telerik team
answered on 15 Jun 2009, 09:08 AM
Hi Seth,

If you do not tab out from the cell, the edit is not committed. You can easily do that by calling the CommitEdit method of RadGridView. I have prepared a small sample project that demonstrates that. It contains a button that commits the edit, a RadGridView, and a DataGrid on the right just to see that you changes are applied after hitting the button. Leave the cursor in the last cell, as you described, and click the button. You will see that changes are reflected on the grid that is on the right.

Please, examine the sample project and if you have any other questions, please let me know.

All the best,
Ross
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
Seth
Top achievements
Rank 1
answered on 15 Jun 2009, 12:08 PM
Hi Ross,

Looks like using the CommitEdit did the trick.  I'm calling that on my Save button action and it appears to be working fine.

Thanks again,
Seth Mims
Tags
GridView
Asked by
Seth
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Seth
Top achievements
Rank 1
Share this question
or