I need to exit edit mode in batch radgrid on client click of a button in that radgrid. Is there any way to do this ?
I couldn't retreive data entered in the RadGrid while its in edit mode (using javascript : "batchManager.getCellValue(mapCell)").
I have to do this in client side too.
Thanks for your help !
AbbasB
5 Answers, 1 is accepted
Note that when Batch Editing is enabled for RadGrid the cells exit edit mode when they are blurred. There is no need to add custom logic for that functionality.
Regarding your other query. Would you elaborate in more detail on what data you would like to retrieve? Also when do you need to access that info?
Regards,
Viktor Tachev
Telerik

Hello Viktor,
I will simplify m demand...
In my RadGrid I have 2 visible columns : a GridTemplateColumn (col1) (TextBox in Edit mode) and a GridButtonColumn (col2).
The client click on the GridButtonColumn opens a RadWindow without firing a postback.
The user must fill the textbox in col1 then click on the button of the col2 to complete filling data in a PopUp window.
In the RadWindow, I have 1 Label and 1 Textbox (that represents 2 hidden columns (col3 and col4) in the RadGrid) and a validation buttons.
The Label must show the value filled of the col1. The user must fill the textbox and then on validation button click I fire BatchEditingCommand to save data in the RadGrid (and the PopUp of course).
What I need to do is to retreive the value of the textbox (col2) when I am in edit mode.
If my request is not clear let me know so I can provide a portion of my code.
Thank you in advance.
Abitar
In order to retrieve the value from a cell you can use the getCellValue() client-side method of BatchEditingManager.
When you have the necessary values you can pass them as additional arguments to the RadWindow when opening it. The approach is illustrated here.
You can use the OnClientClose event of RadWindow to pass the information entered by the user to the parent window.
When you have the new data you can set the values for the cells in RadGrid via the changeCellValue() client-side method. For additional information regarding the client-side API available with Batch Editing check out the following article.
Regards,
Viktor Tachev
Telerik

Hello Viktor,
The simplest way to do what I wanted was by using RadGrid Batch with edit mode = "Cell". In this edit mode I was able to retreive cells content in read mode and in edit mode. That did the job for me !
Thank you for your reply anyway.
Regards,
Abitar
Thank you for sharing your approach with the community.
Regards,
Viktor Tachev
Telerik