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

Set focus in radgrid batch edit cell on page load.

2 Answers 259 Views
Grid
This is a migrated thread and some comments may be shown as answers.
sathesh
Top achievements
Rank 1
sathesh asked on 07 Oct 2016, 12:05 PM

 I am trying to set focus in radgrid batch edit cell in  page  load. I have used the following code in gridcreated and rowselected event but i can't get focus in that cell please give me some suggestion. 

      var MasterTableView = SummarySerialNumberGrid.get_masterTableView();

      var row = MasterTableView.get_selectedItems()[0];
      var SerialNumberCell = MasterTableView.getCellByColumnUniqueName(row, "serialnumber");
      var bthEditManager = SummarySerialNumberGrid.get_batchEditingManager();
           bthEditManager.openCellForEdit(SerialNumberCell);

2 Answers, 1 is accepted

Sort by
0
Accepted
Eyup
Telerik team
answered on 12 Oct 2016, 06:23 AM
Hello Sathesh,

This code snippet should work as expected:
function pageLoad() {
    var grid = $find('<%= RadGrid1.ClientID %>');
    var batMan = grid.get_batchEditingManager();
    var masterTableView = grid.get_masterTableView();
    var item = masterTableView.get_dataItems()[0];
    var cell = item.get_cell("Freight");
    batMan.openCellForEdit(cell);
}

I hope this will prove helpful.

Regards,
Eyup
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
sathesh
Top achievements
Rank 1
answered on 12 Oct 2016, 06:39 AM
Thanks , Your post is working for me as expected.
Tags
Grid
Asked by
sathesh
Top achievements
Rank 1
Answers by
Eyup
Telerik team
sathesh
Top achievements
Rank 1
Share this question
or