Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Override ListGrid Sort(), prefetchData

    Hi!

    I have been using SmartGwt 4.0.
    My questions:
    1)Can I @Override sort method ListGrid?
    2)Can I run prefetchData before fetchData if I need time for prepare date?
    3)Can I stop sorting by Server in handler event onSortChanged event if SortEvent event cancel() method is absent ?
    Last edited by igorr2001; 27 May 2014, 00:24.

    #2
    SmartClient Version: v9.1p_2014-06-04/Pro Deployment (built 2014-06-04)

    I too am curious if there is a way to cancel the SortEvent for the SortChangedHandler (point #3).

    Code:
    listGrid.addSortChangedHandler(new SortChangedHandler() {
            @Override
            public void onSortChanged(SortEvent event) {}
    			
        });

    Comment


      #3
      No, not really. In general, the framework provides various ways to cancel something *the end user* is doing.

      This handler can be triggered by a lot of things, including your own code that has triggered a sort, or internal framework code that has triggered a sort. In those kinds of scenarios cancellation makes no sense, as of course your code or our code assumes the method calls are being obeyed!

      Comment


        #4
        Thank you kindly.

        Comment


          #5
          Speaking of cancelling something the end user is doing, I am looking for an equivalent handler to addHeaderClickHandler(HeaderClickHandler) for handling the user applying a new sort via the Configure Sort... window. I assume since you can handle the header click events and cancel them that there is a way to similarly handle Configure Sort... change events?
          Thanks
          SmartClient Version: v9.1p_2014-06-04/Pro Deployment (built 2014-06-04)

          Comment


            #6
            I see there is a MultiSortCallback, so perhaps what I am looking for here is to integrate my own header context-menu item that opens the multi-sort dialog and provide's custom callback logic here.

            ...confirming this provided the capability I needed.
            Last edited by stonebranch2; 9 Jun 2014, 08:12. Reason: Confirmed

            Comment

            Working...
            X