Set focus in radgrid batch edit cell on page load.

3 posts, 1 answers
  1. sathesh
    sathesh avatar
    3 posts
    Member since:
    Apr 2015

    Posted 07 Oct Link to this post

     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. Answer
    Eyup
    Admin
    Eyup avatar
    3012 posts

    Posted 12 Oct Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. sathesh
    sathesh avatar
    3 posts
    Member since:
    Apr 2015

    Posted 12 Oct in reply to Eyup Link to this post

    Thanks , Your post is working for me as expected.
Back to Top