I am editing the grid cell value by click on particular cell like (quantity column changing from 0 to 3)
I want to get the changed cell value.
Please suggest or help me out to get the solution
Thanks
Puneeth
8 Answers, 1 is accepted
Hello Puneeth,
Thank you for contacting us.
In this scenario you can take advantage of the ValidateCell DataGridCommand. This command is executed when a grid cell value is changed. Through the CellInfo property of the received parameter (which is of type ValidateCellContext) you can get the column, the cell value and the data item.
Unfortunately, at the moment the command is executed, the context hasn't updated its Value which is a Windows 8.1 related issue. As a workaround, you can get the updated cell Value in a Dispatcher.RunAsync() call with Low CoreDispatcherPriority. I have attached a sample project that demonstrates how to do that.
Let me know if this works for you.
Regards,Rositsa Topchiyska
Telerik
Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).
This is the same kind of issue I have. I want to click on a certain cell and change the value from 'In progress' to 'Completed. In your post, you mentioned a sample project enclosed but I don't see that sample project to download. Could you show me where to get that sample project or reattach it to the post.
Thank you,
Dennis
Thank you for writing.
For some reason the attachment was not visible in the public forum. I have reattached the project to my previous answer and it is now available for download.
Please, let us know if you have any other questions.
Regards,
Rosy Topchiyska
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
Thanks again
Thank you for the question.
The editing UI is available only for the typed data grid columns (all types of columns except for the DataGridTemplateColumn). Unfortunately none of the typed columns could be used for your scenario. The editing UI for DataGridNumericalColumn uses a RadNumericBox, which works only with numbers. In your case you can use DataGridTemplateColumn with for example ComboBox as template. Since the editing makes no sense for template column, the use of commands is not applicable. You can use the SelectionChanged event of the ComboBox or listen for property changed of the data item instead. I have attached a sample project that demonstrates how to create a column with ComboBox.
I hope this will give you some ideas. Please, let us know if you have further questions.
Regards,
Rosy Topchiyska
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
In the attached code, I use a column named ECL_Status for the existing data that I want to add my ComboBox selected value. As you can see by the screenshot, it's only loading the three Enums in every row and it's supposed to the current values in the existing data with the option to change the values with one of the Enums.
I hope this makes sense to you.
*** I added a '.png' to the extension of the text file to upload to you. Just delete the '.png' extension off the end to open the text file.
Thanks again
Thank you for contacting us.
I can see that you have used a property called Status in the ComboBox SelectedItem binding, but in your Data class you have ECL_Status property.
I hope this helps. Please, let us know if you have further questions.
Regards,
Rosy Topchiyska
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
Thanks again