PxPlus User Forum

Main Board => Discussions => Programming => Topic started by: Jeffrey Ferreira on August 22, 2019, 01:24:01 PM

Title: Sort On Header Click - ** DISREGARD **
Post by: Jeffrey Ferreira on August 22, 2019, 01:24:01 PM
Hello List,
So i have a grid that takes a long time to load.
After it loads we apply filters. So I thinking I was smart instead of loading again I said i'll manipulate row height to hide filtered rows
everything works fine until they click on a Grid Header and my rows height seem to all go back to default....

Is there a way to either
a.) preserve my row heights
b.) Detect a Sort on Header Click.

i see what is happening
the hidden rows are now being sorted into the positions where the row height is visible and vice versa.
Title: Re: Sort On Header Click - ** DISREGARD **
Post by: felis.domestica on September 06, 2019, 09:53:09 AM
Hello Jeffrey,

I was wondering if you found a way to distinguish a grid's column header click (although you solved your problem)?

One way to do this might be to check the grid.row value, but then you would need an event (<grid>.row = -1 if a column was clicked). If a user clicks the column header i did not find an event (in PxPlus), the column is just sorted. In ProvideX (old version) the column click triggered an change event, which made it possible to programmatically influence column sorting.

Kind regards,
Title: Re: Sort On Header Click - ** DISREGARD **
Post by: felis.domestica on September 06, 2019, 10:53:38 AM
B.T.W. i found this solution https://forum1.pvxplus.com/index.php?topic=148.msg388#msg388,
leaving GRID.CTL'SortOnHdrClick=0 will give you a change event on header clicks.

Hope i didn't spam your (already resolved) list item ...  :-[
cheers