jQWidgets Forums

jQuery UI Widgets Forums Grid Jqwidget soryby and gotopage event in single line

This topic contains 3 replies, has 2 voices, and was last updated by  Dimitar 9 years, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author

  • arunthatham
    Participant

    We have a Jqwidget grid in which when we need to call the grid we need to call the updatedatabound event to refresh the grid .
    If a user clicks the refresh from page 3 to make sure the grid has to go to page 1 we used $(“#data”).jqxGrid(‘gotopage’, 0);
    and also we need the grid to default sort by one column so the syntax for that is $(‘#data’).jqxGrid(‘sortby’, ‘DateLastReported’, ‘desc’);

    But i need both the code to be combined in one line because our grid is server side implementation so for each command it goes to server side i dont want that to happen.
    Please suggest.


    Dimitar
    Participant

    Hello arunthatham,

    Unfortunately, these two commands cannot be combined into one server call.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/


    arunthatham
    Participant

    Thanks for the reply,
    I have another question we have a server side jqwidget grid implementation by default when the initilization happens i need the grid to sort based on one column decending order.
    I dont want a solution like having the piece of code “$(‘#data’).jqxGrid(‘sortby’, ‘DateLastReported’, ‘desc’);” written in binding complete.
    Instead i need in initilization itself,Because if i put in binding complete it makes first call without default sort and then once it comes to binding complete from there it will make another server call.
    Please suggest…


    Dimitar
    Participant

    Hi arunthatham,

    In this case, set the source object’s sortcolumn and sortdirection properties. Here is more information from the grid’s API Documentation:

    sortcolumn – determines the initial sort column. The expected value is a data field name.
    sortdirection – determines the sort order. The expected value is ‘asc’ for (A to Z) sorting or ‘desc’ for (Z to A) sorting.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.