asp.net mvc - MVC Kendo UI Grid - call function after all the rows have been expanded -


i using asp.net mvc kendo grid. on click of button, need expand rows. here code same:

var row = $(this).closest("tr.k-master-row"); grid.data("kendogrid").expandrow(row); 

where , grid have been defined. works well.

on expand of each row, following event called (for each row), detail template bound: .events(events => events.databound("oninnergriddatabound"))

function oninnergriddatabound(e) {      //do here } 

my requirement after initiate call expand rows, have few lines in code, should executed after rows have been expanded. so,

 function expandall()  {     var row = $(this).closest("tr.k-master-row"); //step1     grid.data("kendogrid").expandrow(row);"); //step2       //do after oninnergriddatabound event called     every expanded row.      ..................................     //ideally should step 4 executed, executes     //after step2  }  //ideally step 3 execute, executes last function oninnergriddatabound(e) {      //do here } 

i want avoid using settimeout method, don't know how long take or flags.

hope find answer soon.

thanks!

have tried this?

not sure if it'd work here should like:

$.when(grid.data("kendogrid").expandrow(row))  .done(function () {      //after completing expandrow event  })  .then(function() {     //something else }); 

again, may not work @ since i'm not sure if kendogrid events can treated deferred objects it's worth shot.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -

Why does a .NET 4.0 program produce a system.unauthorizedAccess error on a Windows Server 2012 machine with .NET 4.5 installed? -