This topic is locked

Sorting

11/9/2008 9:26:20 PM
ASPRunnerPro General questions
W
Wanda author

Is there a way we can enable/disable column sorting selectively
For example, if a user with Admin Abilities (See/Edit/Delete all) we would like that user (ID & User Level fields are setup) to be able to sort on all columns or a few.
On the other hand, if a standard user (See/Edt their own only) there is no need to sort because the records are already presented in appropriate order. Some of our test users are confused as to why they have sorting abilities given this scenario.
Users - hmmm.
Thanks.

J
Jane 11/11/2008

Hi,
here are some tips:

  1. edit sorting link manually in HTML mode on the Visual Editor tab.

    Here is a sample:
    {BEGIN FieldName_fieldheader}<A class=tablelinks {$FieldName_orderlinkattrs}>FieldName</A>{END FieldName_fieldheader}

    {BEGIN FieldName_fieldheader2}FieldName {END FieldName_fieldheader2}


2. then add List page: Before display event on the Events tab:

if Session("UserID")="admin" then

xt.assign "FieldName_fieldheader",true

xt.assign "FieldName_fieldheader2",false

else

xt.assign "FieldName_fieldheader",false

xt.assign "FieldName_fieldheader2",true

end if