Sunday, December 15, 2013

KendoUI Grid calculate new virtual scrollbar without rebinding grid


KendoUI contain many UI for web developer, one of it is KendoGrid.
KendoGrid supported many features such as inline editing, moving/resizing/sorting column, etc.

One of useful feature is virtual scrollbar (demo), Kendo make it worked both desktop/mobile browser but if you project have more than one view type.

For example compact/full mode which have a different row heights, the easy way to do is binding grid with the old datasource and another way is let's it calculate the virtual scrollbar.

Let's try..

5 comments:

  1. Can we use WebAPI 2 which returns data in Json format instead of Odata?

    ReplyDelete
    Replies
    1. Yes, you can.. check it out at dataSource transport object (http://docs.telerik.com/kendo-ui/api/framework/datasource#configuration-transport)

      Delete
    2. Sorry for not clarify my question, actually i need to implement kendo-grid in angulajs with virtual scrolling enabled. It is working but if only i used svc service that returns data in OData format. Instead of it i have WebAPI that returns JSON and want to use this service only and should compatible with angularjs kendo grid with virtual scrolling.

      Any help would be appreciated!

      Delete
    3. Here is example that I did.. (http://trykendoui.telerik.com/okUw/2)

      If you need more example for kendo + angular, please check (http://kendo-labs.github.io/angular-kendo/#/Grid)

      Delete
    4. I guess there is some problem in virtual scroll in the provided example. Data gets disappear if you scroll down.

      Delete