Jump to content
uniGUI Discussion Forums
Sign in to follow this  
Freeman35

How to dbgrid columsort in runtime?

Recommended Posts

Hello,

How can I set unidbgrid's column(s) sort on form create?

Or I need just set column's order direction glyph? (up or down) 'cos my query has a default "order by" structure, I have to set this to grid, so user can see which column(s) sorted when form opened.

regards.

Share this post


Link to post
Share on other sites

Thank you its worked. But :)

If Grid's LoadMask.WaitData is True, (Target is owner form) never unlock.

Share this post


Link to post
Share on other sites
function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts)
{
    if (columns[0].isSortable()) {
        columns[0].sort('ASC')
    }
}

This code, remove trigger event.

I have TUniDBText and TUniDBEdit. this components's datasource is same with TUniDBGrid. If Add reconfigure code to grid, this component not triggered, I mean when move grid row, (grid's row change) thşs component's values not change, dbedit's onchange events not triggered too.

What can be wrong?

Share this post


Link to post
Share on other sites
6 hours ago, Freeman35 said:

This code, remove trigger event.

I have TUniDBText and TUniDBEdit. this components's datasource is same with TUniDBGrid. If Add reconfigure code to grid, this component not triggered, I mean when move grid row, (grid's row change) thşs component's values not change, dbedit's onchange events not triggered too.

What can be wrong?

It seems I couldn't reproduce your issue.

Can you explain in more details (or by making a simple testcase) ?!

Share this post


Link to post
Share on other sites

I added video, when run in my system. original demo from  this link. I added just two component and reconfigure function thats all.

unigui ver. 1480,  win10-x64, tokyo.

regards.

0 FreeMan.7z

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×