I have seen this question asked before but not recently. With the introduction of v6.1 is there a way to prevent the reordering of columns in table view?
Hi Matt,
When you attach a method to the onSort event, one line of code will be generated that takes care of the sorting:
function onSort(dataProviderID, asc, event) {
controller.sort(dataProviderID + (asc ? ' asc' : ' desc'), false)
}
Just comment out that line and sorting will be no more. If you want to do something else instead you can code that in the same method.
Regards,
I think he means, re-ordering columns, not sorting columns
You can use the field anchors to control how the size and position of the fields can be modified by the user. If you want to prevent the user to modify the order of the columns then you have to anchor them to the bottom. If you want to have certain columns always at the left side of the tableview anchor them top-left-bottom, or at the right side of the tableview use anchors top-right-bottom.
Just play around with these options to see how they work.
Harjo:
I think he means, re-ordering columns, not sorting columns
Oops, sorry about that. For what it’s worth: the portal has a reorderable property you can set to false but that won’t do you any good in this form.
Thank you all for the responses.
Yes, I did mean re-ordering of columns, not sorting. But that was an excellent tip all the same. Good to know.
I will give the anchoring a try.