The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
How to set an initial sort on a Lan datagrid
Posted: 17 Nov 11 5:31 PM
|
fiogf49gjkf0d On the "Associate Campaign" form, there is a grid "grdCampaign". I want to set initial sort on CAMPAIGNNAME. I added “Order by CAMPAIGNNAME” into the SQL string. But when I open the form, it doesn't work. Any thoughts?
Our system is SLX Lan 7.5.3 |
|
|
|
Re: How to set an initial sort on a Lan datagrid
Posted: 17 Nov 11 5:58 PM
|
fiogf49gjkf0d The grid also has a set of columns (the SQL is used to override/refresh) - so, click the Columns property of grid, click the column campaign name. Should do it (the SQL retrieves the data - orderby ignored - and the grid sorts the data in memory). |
|
|
| |
|
Re: How to set an initial sort on a Lan datagrid
Posted: 18 Nov 11 3:09 PM
|
fiogf49gjkf0d One more question:
After the grid is refreshed, it always selects and displays a row in the middle of the grid (the right-side vertical scrollbar is in the middel position) and we can't see the first row. What we need is that the grid displays the first row (the right-side vertical scrollbar is on the top).
|
|
|
|
Re: How to set an initial sort on a Lan datagrid
Posted: 18 Nov 11 6:24 PM
|
fiogf49gjkf0d You can set use SelectFirstRecordForGrid(yourGridName) (this is from the script SLX_Common, just include it in yours) - this will select the first record in the grid (if there are any). |
|
|
| |
|