folgende Problematik
ich ahbe einen browse-Anzeige um diese auch per Klick zu sortieren. Wenn ich einen Artikel auswählen möchte muss ich erst auf die Überschrift klicken - mache ich dies nicht erhalte ich eine Fehlermeldung.
Hat jemand eine Idee ?
Code: Alles auswählen
use (cHeimat+"\TmpBestLArt") New
Index on lartnr Tag "1" to (cHeimat+"\TmpBestLArt.cdx")
Index on artnr Tag "2" to (cHeimat+"\TmpBestLArt.cdx")
Index on text Tag "3" to (cHeimat+"\TmpBestLArt.cdx")
TmpBestLArt->(OrdSetFocus("1"))
DbSelectArea("TmpBestLArt")
oLABrowse := GuiBrowseDb( oDlg, {100,70}, {400,250} )
If nFarbe > 0
aPP := {{ XBP_PP_FGCLR , nFarbe} , ;
{ XBP_PP_BGCLR , GRA_CLR_WHITE }}
oLaBrowse:setPresParam( aPP )
Endif
FOR i=1 TO FCount()
cField:=FieldName( i )
oBrowseCol:=oLABrowse:addColumn(FieldBlock(cField),,cField,,)
oBrowseCol:Heading:LbClick := &("{||SortiereLArt("+Ltrim(Str(i,5,0))+"),oLABrowse:RefreshAll()}")
NEXT i
TmpBestLArt->(OrdSetFocus("1"))
TmpBestLArt->(DbGoTop())
SortiereLArt(1)
Code: Alles auswählen
#include "dmlb.ch"
Function SortiereLArt(nPos)
Local cName:="", cNr:=""
cNr:=alltrim(str(nPos))
DbSelectArea("TmpBestLArt")
TmpBestLArt->(OrdSetFocus(cNr))
TmpBestLArt->(DbGotop())
Return Nil