Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I tell what header sort order is currently active? 1

Status
Not open for further replies.

rleiman

Programmer
May 3, 2006
258
US
Hi Everyone,

On a browse listbox the header sorting is enabled. I noticed that after clicking on the header there is either a + for ascending order or a - for decending order. This is a good clue as to which column has the sort applied.

If I exit the application and start it again, the header sort indicators + or - is not displayed until I click on one of the headers.

How can I tell what sort order is currently active?

Thanks.

Emad-ud-deen Richard Leiman
 
Hi Emad,

The default sort order is based on the key you have chosen.

You can get the Sort Order by :

BRW1.SetSort - After the Parent Call, at Priority 7500:
LOC:SortColumn = BRW1::SortHeader.GetSortOrder() ! get the number of the current sort column
LOC:ColumnName = BRW1::SortHeader.GetColumnText(LOC:SortColumn) ! get the name of the current sort column

You can also use BRW1::SortHeader.SetSortOrder(<long Column No>) to set the Sort Order.

Regards
 
Hi ShankarJ,

Thanks for the much needed help. Now I can show the user what the order is.

Truly,
Emad
 
Hi ShankarJ,

I tried MyBrowse::SortHeader.GetColumnText(LOC:SortColumn)
but it did not understand GetSortOrder() or GetColumnText().

I am using version 6.3 professional. Is it possible they are not supporting GetSortOrder() or GetColumnText() any more?

I also tried the help documentation but it was not in there either.

Thanks.

Truly,
Emad
 
Hi Emad,

Check out BRWEXT.inc & BRWEXT.clw in the \Clarion6\LIBSRC folder for the properties/methods of SortHeaderClassType. Also, how did you change the object name to MyBrowse::SortHeader? It nomally is BRWn::SortOrder even though you have changed the Browse Object. Check the Generated source for the proper object name.

Regards
 
Hi ShankarJ,

I changed the name in the window that has the class name for the object. I actually used the name Browse:Layaway. I used that same name when doing a refresh on browse.

Thanks.

Emad
 
Hi Emad,

Browse Sorting is enabled by setting the 'Enable Sort Headers' in the extended properties of the browse. If you notice you have NO option to change the Class/Object Name unlike a browse. So you must check the Generated source to find out the Object name of the SortHeaderClassType. It will always be BRWn::SortHeader where n is the Template Number of the Browse.

Regards
 
Hi ShankarJ,

I did it from the Classes tab of Browse Box Behavior in the Object Name: entry field.

Truly,
Emad
 
Hi Emad,

But that's is the BROWSE object which is an instance of the BrowseClass. The BRW1::SortHeader is an instance of the SortHeaderClassType and as of C6.2.9049, you cannot change the generated that object name. Look at your generated CLW file for this procedure and confirm.

Regards
 
Hi ShankarJ,

I am still very new to Clarion 6.3 and don't know much about that, but tonight I can try it as BRW1::SortHeader.GetSortOrder()

Thanks.

Truly,
Emad
 
Hi ShankarJ,

BRW1::SortHeader.GetSortOrder() did work. It return the numbers I needed.

Thank you very much for being patient with me.

Truly,
Emad
 
Hi Emad,

Gald it worked. But do not assume it will be BRW1. It could be BRW5 if it wizard/wizatron generated. Always check the source for the Object Name and use.

Regards
 
Hi. ShankarJ,

Yes, I will check it each time. Do you think SoftVelocity may allow BRW# to be changed like you can in the window that has the class name for the object in a future release?

Truly,
Emad
 
Hi Emad,

This is done in the templates. You can modify the Templates to allow you to enter the Class but then you need to keep on making the changes as and when SV releases new versions. Not worth the hassle.

Regards
 
Hi ShankarJ,

Thanks for the info.

Truly,
Emad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top