Jump to content

Recommended Posts

Posted

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 :-)

 

  • Like 1
  • Upvote 4
  • 1 year later...
  • 5 months later...
Posted

I do not have the event Ext.data.Store  -> store.afterCreate

 

I tried to put the event Ext.grid.Panle -> headerclick but it did not work. any ideas?

 

Regards,

  • 2 months later...
Posted

Thank you...
How to sort all the data in the grid.
This process only sees the page you are on ..

 

teşekkürler...
Grid içerisindeki Tüm dataları nasıl sıralarız.
Bu İşlem Sadece Bulunduğu Sayfayı Sıralıyor..

  • 3 weeks later...
Posted

Super !!

 

it works just fine ! (:

 

Thank you very much delagoutte  :)

 

nb: My manager don't like Js, so I might use this solution in last resort, I'm going to answer to your other post  ^_^

  • 2 months later...
Posted

Hi,

 

hi, I tried your code, but not successful. what is frmcaseview?do i need to change something with my dlphi component's  name?

 

Which edition and build are you using ?!

 

Best regards,

  • 6 months later...
Posted
I have a problem in dbgrid, when I click on the column to sort LoadMask appears at the time of the click but it does not undo, with the screen stuck and the column does not sort. I'm using the option of our friend Mohammad.

 

function headerclick (ct, column, e, t, eOpts)

{

   Frame.dbgrid.getStore (). Sort (column.dataIndex);

}

 

function store.afterCreate (sender)

{

   sender.remoteSort = false;

}

  • 2 weeks later...
Posted

Hello there ! (:

 

You should try this out :

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

^_^

  • 1 month later...
Posted

Hello UniGUI users ! (:

I have a question concerning sorting..

at the moment, I cancel a specific sort like that:

  UniSession.AddJS(uniDBGrid1.JSName + '.getStore().sorters.remove('+IntToStr(UniDBGrid1.CurrCol)+');');
  UniSession.AddJS(UniDBGrid1.JSName+'.getView().refresh();');

If it's the only sort that was on the grid, the order of aggregats does not change. Then if I wants to apply the same sort on the same column, sorting is indeed visible on the interface, but event UniDBGrid1MultiColumnSort is not fired.. is this normal behavior ?

What can I do to force the fire of this event ? (We have our own logic so it is unfortunate if event is not fired..)

Regards,

Posted

Hello Sherzod,

Yeah I know this post, and yes my config.multiColumnSort is set to true.

I think that this issue append when your datas are already sorted and that you sort request does not change it. In that case only, event multiColumnSort is not fired.

Can you reproduce ? if not, I will make a testCase tomorrow! (I already tested it in a minimalist project).

Regards,

 

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...