xsharp.eu • Advice on Column sorting bBrowser please
Page 1 of 1

Advice on Column sorting bBrowser please

Posted: Thu Jul 25, 2019 3:53 am
by Anonymous
Hi guys.

My question is this:

I have a bBrowser with 17 columns. Each column could be in any one of 3 possible scenarios - Finished, Not Finished or BOTH, depending on a logical value in the "JOBFIN" field.

My Client wants to be able to click on any column heading and sort ascending and descending "just like you can do in Excel" does this mean I have to write 3 indexes for each column, or is there a much more efficient way? I'm tipping there is, but it's eluding me atm.

Advice on Column sorting bBrowser please

Posted: Thu Jul 25, 2019 4:12 am
by wriedmann
Hi Jeff,
you can do that in Excel because it is static data.
If you need that in VO, you can either use a ListView (static data), or set an index for every column you need to sort on.
Personally, I'm using more and more listviews on a reduced data set.
Wolfgang

Advice on Column sorting bBrowser please

Posted: Thu Jul 25, 2019 6:05 am
by BiggyRat
Ok, thanks for that Wolfgang :)

Advice on Column sorting bBrowser please

Posted: Thu Jul 25, 2019 9:19 pm
by ohernandez@sistemas-liasa.com
Hi jeff,
I do:
oServer := oEvent:Control:Server
iSize := oServer:OrderInfo(DBOI_ORDERCOUNT)
FOR iPos:=1 upto iSize
IF cExpression=Upper(oServer:OrderInfo(DBOI_EXPRESSION,, iPos))
exit
ENDIF
NEXT

oServer:SetOrder(iPos)

swap the logic value for any captionclick, keeping record of the descend or not value and put a sign with a caption:valuelist.
oServer:OrderDescend(iPos,,true)
..
oEvent:Control:Redraw(#Caption)

Advice on Column sorting bBrowser please

Posted: Fri Jul 26, 2019 12:57 am
by BiggyRat
Thank you very much Oscar, I'll give that a go :).