locking sort in a dataGrid column
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
locking sort in a dataGrid column
I want to lock the user out of being able to sort columns in a DG.
I can set the "sort by column" in the inspector to "false"
and I can:
set the dgColumnIsEditable["fade"] of grp "queue1" to "false",
but neither of these has any effect. If I click in the column header, a sort triangle appears, and the column is then sortable. Resetting from the inspector makes the sort arrow go away. Great. Is there no "lock" gizmo with teeth? Is this a bug?
I guess I can place a transparent object over the column headers, and head them off at the past.
Thanks.
Craig Newman
I can set the "sort by column" in the inspector to "false"
and I can:
set the dgColumnIsEditable["fade"] of grp "queue1" to "false",
but neither of these has any effect. If I click in the column header, a sort triangle appears, and the column is then sortable. Resetting from the inspector makes the sort arrow go away. Great. Is there no "lock" gizmo with teeth? Is this a bug?
I guess I can place a transparent object over the column headers, and head them off at the past.
Thanks.
Craig Newman
Re: locking sort in a dataGrid column
Hi Craig,
verified with LC 5.02, the settings "Sort by column" is being ignored for ALL columns if you click the headers, big fun :-/
Looks like a bug, please write to: bugs@runrev.com
Best
Klaus
verified with LC 5.02, the settings "Sort by column" is being ignored for ALL columns if you click the headers, big fun :-/
Looks like a bug, please write to: bugs@runrev.com
Best
Klaus
Re: locking sort in a dataGrid column
Try to put handler:
on SortByColumn
end SortByColumn
in group "yourDataGrid"
Marek
on SortByColumn
end SortByColumn
in group "yourDataGrid"
Marek
-
- VIP Livecode Opensource Backer
- Posts: 163
- Joined: Tue Jan 26, 2010 10:15 pm
- Contact:
Re: locking sort in a dataGrid column
Hi Craig,dunbarx wrote:I want to lock the user out of being able to sort columns in a DG.
I can set the "sort by column" in the inspector to "false"
and I can:
set the dgColumnIsEditable["fade"] of grp "queue1" to "false",
but neither of these has any effect. If I click in the column header, a sort triangle appears, and the column is then sortable. Resetting from the inspector makes the sort arrow go away. Great. Is there no "lock" gizmo with teeth? Is this a bug?
I guess I can place a transparent object over the column headers, and head them off at the past.
Thanks.
Craig Newman
This is definitively not a bug.
The "sort by column" option in the inspector, allows to sort the datagrid by a specific column by default or to remove any default column sorting. Unchecking the check box, not disable the ability to sort a column in the datagrid by clicking on its header.
The correct way to really lock the column header is to add this handler in the datagrid group:
Code: Select all
on SortDataGridColumn pColumn
## Remain this handler empty for disabling the sort capability of a datagrid
end SortDataGridColumn
Best Regards,
TheSlug
http://www.aslugontheroad.com - Tutorials, demo stacks and plugins for LiveCode
Data Grid Helper - An intuitive interface for building LiveCode's Data Grids
Excel Library- Extends the LiveCode language for controlling MS Excel
http://www.aslugontheroad.com - Tutorials, demo stacks and plugins for LiveCode
Data Grid Helper - An intuitive interface for building LiveCode's Data Grids
Excel Library- Extends the LiveCode language for controlling MS Excel
Re: locking sort in a dataGrid column
Thanks to both of you.
I checked the messageWatcher when clicking in a header, and among the 3000 messages sent, I see both " SortByColumn" and "SortDataGridColumn".
Dead giveaways. Trap and forget.
Craig
I checked the messageWatcher when clicking in a header, and among the 3000 messages sent, I see both " SortByColumn" and "SortDataGridColumn".
Dead giveaways. Trap and forget.
Craig
Re: locking sort in a dataGrid column
Hi Zryip,
Long time without new futures in DGH. Maybe next small but usefull is to click outside of DG or on header bar to "unsort"?
And second one - small graphics after last column header to trigger Sorting on/off while still have possibility to select column.
And one more thanks for "UTF-8" in DG field editor - it's still not native implemented in LC5.5
Marek
Long time without new futures in DGH. Maybe next small but usefull is to click outside of DG or on header bar to "unsort"?
And second one - small graphics after last column header to trigger Sorting on/off while still have possibility to select column.
And one more thanks for "UTF-8" in DG field editor - it's still not native implemented in LC5.5
Marek