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

Refresh grid and open the previous edit item

2 Answers 155 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Oren
Top achievements
Rank 1
Oren asked on 12 Mar 2015, 12:32 PM
Hello,
I have a problem when trying to refresh the grid. when editing a item in the FormTemplate I want the grid to refresh and open the same row that was opened.
I used this javascript function in order to do so:
  var refreshGrid = function () {
        var masterTable = $find("<%= RadGridTranslations.ClientID %>").get_masterTableView();
        var openedItem = masterTable.get_editItems()[0].get_element();
        masterTable.editItem(openedItem);
    }

My problem is that the grid refresh and only the row in the same index location is opened. for example if the openedItem was in row number 3 , and by the time the grid refreshed , 2 items have been added , after the editItem function the grid is refreshed and open row is number 3 even though the openedItem is number 5.

Any help will be appreciated,
Kind regards.
 

2 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 12 Mar 2015, 06:12 PM
Hello,

You are re-open the edit form based on index so it is opening the wrong item/row in edit mode.

What I would suggest is that when you click on edit button or after opening the edit form please store current row datakeyvalue in variable and after refreshing the grid based on variable's value find the particuler row and open it in editable mode. 

Please check below links for to get understanding of clientdatakeyvalues.
Extracting Key Values Client-side
Access RadGrid Row and Column on Client Side

Thanks,
Jayesh Goyani
0
Jaya
Top achievements
Rank 1
answered on 19 Mar 2015, 06:23 AM
Hi
Jayesh Goyani

I have Telerik Grid With one GridTemplateColumn for  <asp:TextBox here when i enter this textbox. I need total amount calculate and show the Footer column using Javascript or Jquery how will do this can you guide me most urgent.
Tags
Grid
Asked by
Oren
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Jaya
Top achievements
Rank 1
Share this question
or