xBrowse MARQSTYLE_HIGHLROW .. Rao

xBrowse MARQSTYLE_HIGHLROW .. Rao

Postby Rick Lipkin » Thu Mar 02, 2017 6:54 pm

Rao

I am using a highlrow where the user can click on multiple xBrowse rows :

Image

and I click Transfer .. I get the Bookmark array :

Image
Code: Select all  Expand view

//----------------------
Static Func _TranAll( oRsInvt,oWnd,oLbxMain,oRsInvDetail,;
                      oWndChildD,oRsInv,lTaxable,oTaxable,oFontB,oFontBig,nRepairNumber,;
                      oLabor,oParts,oMisc,oTax,oTotal,nAssignedTo,cLoc,cTaxSet,;
                      oOther,oSubtotal,oLbx,oBtn1,oBtn2,oBtn3,lIsTrucker )

Local aCols,Saying,i

aCols := oLbx:aSelected

xbrowse(aCols)

For i = 1 to Len(aCols)
    oLbx:BookMark(aCols[i])
   _TransFer( oRsInvt,oWnd,oLbxMain,oRsInvDetail,;
                      oWndChildD,oRsInv,@lTaxable,oTaxable,oFontB,oFontBig,nRepairNumber,;
                      oLabor,oParts,oMisc,oTax,oTotal,nAssignedTo,cLoc,cTaxSet,;
                      oOther,oSubtotal,oLbx,oBtn1,oBtn2,oBtn3,lIsTrucker )
Next

Return(nil)
 


You will notice I am looping through the array, but unfortunitly the the bookmark does not move to the correct data row and I get the same Data twice:
First Bookmark:

Image

Second Bookmark:

Image

Final transfer to invoice:

Image

How can I force looping through the BookMark array to move the record pointer to the correct data line ?

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2657
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: xBrowse MARQSTYLE_HIGHLROW .. Rao

Postby nageswaragunupudi » Fri Mar 03, 2017 2:02 am

Instead of
oLbx:BookMark(aCols[i])
Please use oLbx:BookMark := aCols[i]

Actually, the entire process can be simplified.


After the user selects some rows, ..
Code: Select all  Expand view

nSavePos := oRs:AbsolutePosition
oRs:Filter := oBrw:aSelected
aSelectedData := oBrw:GetRows()
oRs:Filter := ""
oRs:AbsolutePosition := nSavePos
oBrw:Refresh()

XBROWSER aSelectedData  // use this data as u like
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10471
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse MARQSTYLE_HIGHLROW .. Rao

Postby Rick Lipkin » Fri Mar 03, 2017 1:52 pm

Rao

Thank you Very Much oLbx:BookMark := aCols[i] worked perfect!

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2657
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 12 guests