Data Grid - Initial Sort

Hi,
happy new Year !
and time to start NG Client project,
but questions over questions - hope you can help

First
I use a Data grid with just one column on a form (Dataprovider: bib_testdaten.autor) and inital Sort "name_match asc

But, when datagrid is displayed I have to use the sort-Button,
how can I start in sorted order ?

Thanks,
Best
Ralf

Hi Ralf,

The Data Grid component itself doesn’t have an initial sort property. That must be coming from the from property. The data grid is bound to a found set and will control and show what is the sort of the foundset. It could be that the grid is using the form foundset, but sometimes the form’s initialSort property is not respected if the foundset is first initialized somewhere else.

You could sort the foundset in onShow(firstShow) event: foundset.sort(sortString,defer)

Hope this helps

Best,
Sean

Hi Sean

Is it possible to defined sort properties for the grid itself? With gridOptions? I find examples in the internet, but can’t get it running.

Thank you for any help
and kind regards
Birgit

Hi Birgit,

Please see the post above. Did you try to sort the foundset ? The grid is bound to a foundset object and that object’s state takes precedent because it is controlling how the records are loading from the DB.

Best,
Sean