Title: allow initial data in server-side data grid Post by: jpierce on May 07, 2013, 08:07:15 AM I'm trying to switch to EasyUI grid from DataTables. But it seems the server-side grid doesn't support a feature that DataTables does that I really need. DT allows you to tell it there is initial data in the existing table so you don't have to make a second trip to the server to get it. Our server serves up the table with that initial page of data in it and uses the DataTable's iDeferLoading option to tell it to only request more data from the server when needed.
So far I'm thinking I will have to ditch the automatic loading and define my own loader function. Wish there was built in support for this as in DataTables, as it seems a common design pattern. FYI, I also posted this here: http://jquery-easyui.wikidot.com/forum/t-650145/allow-initial-data-in-server-side-data-grid But I'm not sure if that's really all that lively of a place for discussion. Title: Re: allow initial data in server-side data grid Post by: stworthy on May 07, 2013, 07:11:27 PM There is no built in feature similar to 'iDeferLoading' but customizing the loader can do the same thing. Here is the simple implementation:
Code: <script> And the usage shows below: Code: <table class="easyui-datagrid" title="Basic DataGrid" style="width:700px;height:250px" Title: Re: allow initial data in server-side data grid Post by: jpierce on May 13, 2013, 08:42:13 AM Thanks for the reply with the sample code. I'll give it a shot. This is along the lines of what I vaguely had in mind as a workaround.
Is there a "wishlist" for EasyUI? Can I add this to it or could you? Thanks again. Title: Re: allow initial data in server-side data grid Post by: jpierce on May 16, 2013, 09:34:21 AM Just wanted to say that I finally got a chance to plug this in and it works GREAT. Thanks again.
|