Jump to content

DBGrid Clientside Sorting


mhmda

Recommended Posts

  • 1 month later...
  • 2 weeks later...

Hello there!

we found another issue on sorting.

The aim is to apply a sorting profil to grid when it is opened. Currently we are simulating header click/sorting as following:

 UniSession.AddJS(UniDBGrid1.JSName+'.store.getSorters().add(new Ext.util.Sorter({property: 0,direction: ''ASC''}))');

It is working properly except for the first column of the grid. Data seems to be sorted but pictogramme is not showed. How could we do So ? Would you suggest another approach ?

With the hope of reading you promptly,

Link to comment
Share on other sites

On 1/20/2016 at 6:19 PM, mhmda said:

Hi,

 

As default behavior of dbgrid is performing sorting in server side, but sometimes you fetch all data into grid (no paging) and the data is already in client, so why return to server to sort data !!

 

Do the sort in client side:

 

1. Disable remoteSort (store):

 

s1.png

 

 

 

2. Set 'click' event on column header and do sorting:

 

s2.png

 

 

Hope this will help you :-)

 

It works, but it doesn't handle toggling between ascending/descending. How can it be done ?

Link to comment
Share on other sites

  • 2 weeks later...
  • 6 months later...
  • 1 month later...
  • 5 weeks later...
On 9/4/2019 at 1:30 PM, Mischa said:

instead of code or a screenshot I just see "s1.png" as a picture in first post (and all other referring to this). What is going wrong?

Hello,

These screenshots were located on another external server. They were probably deleted or moved.

Link to comment
Share on other sites

  • 4 months later...
  • 1 year later...
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...