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

How can I close row edit in Batch RadGrid using Javascript ?

5 Answers 318 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Abitar
Top achievements
Rank 1
Abitar asked on 25 Aug 2015, 02:49 PM

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

Sort by
0
Viktor Tachev
Telerik team
answered on 27 Aug 2015, 03:22 PM
Hi Abitar,

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
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 Feedback Portal and vote to affect the priority of the items
0
Abitar
Top achievements
Rank 1
answered on 27 Aug 2015, 03:46 PM

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

 

 

 

0
Viktor Tachev
Telerik team
answered on 01 Sep 2015, 02:00 PM
Hello 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
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 Feedback Portal and vote to affect the priority of the items
0
Abitar
Top achievements
Rank 1
answered on 01 Sep 2015, 02:09 PM

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

 ​

 

0
Viktor Tachev
Telerik team
answered on 03 Sep 2015, 04:15 PM
Hello Abitar,

Thank you for sharing your approach with the community.

Regards,
Viktor Tachev
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Abitar
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Abitar
Top achievements
Rank 1
Share this question
or