How to reload Grid?

6 posts, 1 answers
  1. agv
    agv avatar
    4 posts
    Member since:
    Nov 2011

    Posted 28 Nov 2011 Link to this post

    I have added some text fields above my grid. I was wanting to attach a change event on these fields so that the grid reloads when the field are updated. I was wondering if there is a way to reload or re-initialize the grid?

  2. Answer
    Rosen
    Admin
    Rosen avatar
    2678 posts
    Member since:
    Sep 2012

    Posted 29 Nov 2011 Link to this post

    Hello Agv,

    In order to refresh the data to which grid is bound, you should call its dataSource read method:

    $("#grid").data("kendoGrid").dataSource.read();

    This will repopulate the dataSource data using the assign transport.

    Regards,
    Rosen
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!

  3. David
    David avatar
    4 posts
    Member since:
    Dec 2011

    Posted 02 Dec 2011 Link to this post

    This doesnt seem to be working 

    $('#refresh').button().click(function(){
      //$('body').prepend('refresh called.<br/>');
      var l = gdata.length;
      gdata[gdata.length] = {ChainRing: l, MidDriveGear: l, MidDriveOutput: l, RearSprocket: l, GearRatio: l, Motive: l, GearInch: l, Speed: l };
      $("#grid").data("kendoGrid").dataSource.read();
         
     
      

  4. agv
    agv avatar
    4 posts
    Member since:
    Nov 2011

    Posted 05 Dec 2011 Link to this post

    $("#grid").data("kendoGrid").dataSource.sync();

  5. Abhishek
    Abhishek avatar
    7 posts
    Member since:
    Jul 2012

    Posted 22 Aug 2012 Link to this post

    1- Try to disable the cache in Kendo grid's datasource read property.

    'cache: false'

    read: {
        dataType: "json",
        url: <<"url">>,
        cache: false
    }

    and then,

    2- $("#grid").data("kendoGrid").dataSource.read();

    It worked for me :)

  6. Stanislav
    Stanislav avatar
    4 posts
    Member since:
    Aug 2012

    Posted 24 Aug 2012 Link to this post

    Hello! Reloading collapses all expanded subtrees and actually I dont know how to do it via current API. How to save grid state and extract it on reload?

Back to Top