XBROWSE autosort questions

XBROWSE autosort questions

Postby avista » Wed Feb 22, 2012 8:44 pm

Hi,
I need help about:
1. How to focus column when click to sort that column. (by default if column 1 is focused and press autosort to column 3 ... column 1 stay focused)
2. How to go top or go bottom when click sort some column
3. SEEK options:
example if i have next values on some column

1312
1425
1500
2000

if i click 1, pointer go to 1312 seek(1)
if i click 4, pointer go to 1425 seek(14)
next if i click 2 pointer stay on 1425 (to start new seek i need to go row up or row down)

I need if next character nof found, seek to be reset and go to first value found with that charactes...
in this case to go to 2000

hope i explained understandable

Best regards
User avatar
avista
 
Posts: 301
Joined: Fri Jun 01, 2007 9:07 am
Location: Macedonia

Re: XBROWSE autosort questions

Postby ShumingWang » Thu Feb 23, 2012 2:22 am

fwh +harbour +tmysql

obrow:aCols[1]:bLClickHeader := {|r,c,f,o| ::Sto1210( o ) }
obrow:aCols[3]:bLClickHeader := {|r,c,f,o| ::Sto1210( o ) }
obrow:aCols[3]:bLClickHeader := {|r,c,f,o| ::Sto1210( o ) }
obrow:aCols[3]:bLClickHeader := {|r,c,f,o| ::Sto1210( o ) }

method sto1210(oCol) classs to12class
local aCols,cOrder,nFor,nLen
local nat,id1
aCols := oCol:oBrw:aCols
cOrder := oCol:cOrder
nAt := oCol:nCreationOrder
nLen := LEN(aCols)

for nFor := 1 to nLen
aCols[ nFor ]:nHeadBmpNo := 0
aCols[ nFor ]:cOrder := ""
next

do case
case nAt==1
id1:=::odb1:custid
::odb1:cQuery:="select * from custm1 order by custid"+if(corder=="A"," desc","")
::odb1:refresh()
::obrow:refresh()
::obrow:bseek:={|v|::odb1:SEEK(v,,{||::odb1:custid})}
::obrow:SEEK(id1)
case nAt==3
id1:=::odb1:custm
::odb1:cQuery:="select * from custm1 order by custm"+if(corder=="A"," desc","")
::odb1:refresh()
::obrow:refresh()
::obrow:bseek:={|v|::odb1:SEEK(v,,{||::odb1:custm})}
::obrow:SEEK(id1)
case nAt==5
id1:=::odb1:sales
::odb1:cQuery:="select * from custm1 order by sales"+if(corder=="A"," desc","")
::odb1:refresh()
::obrow:refresh()
::obrow:bseek:={|v|::odb1:SEEK(v,,{||::odb1:sales})}
::obrow:SEEK(id1)
case nAt==6
id1:=::odb1:addrc
::odb1:cQuery:="select * from custm1 order by addrc"+if(corder=="A"," desc","")
::odb1:refresh()
::obrow:refresh()
::obrow:bseek:={|v|::odb1:SEEK(v,,{||::odb1:addrc})}
::obrow:SEEK(id1)
endcase
if nat==1.or.nat==3.or.nat==5.or.nat==6
if cOrder == "" .or. cOrder == "D"
oCol:cOrder := "A"
oCol:nHeadBmpNo := 1
else
oCol:cOrder := "D"
oCol:nHeadBmpNo := 2
endif
end


return
http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
ShumingWang
 
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Re: XBROWSE autosort questions

Postby avista » Thu Feb 23, 2012 7:34 pm

Sorry i dont understand
where can i find class to12class
usable sample PLEASE ?

Best Regards,
User avatar
avista
 
Posts: 301
Joined: Fri Jun 01, 2007 9:07 am
Location: Macedonia

Re: XBROWSE autosort questions

Postby ShumingWang » Fri Feb 24, 2012 2:10 am

You can replace the methods /class to functions .

Regards!
Shuming Wang
http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
ShumingWang
 
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 74 guests