Getting selected row content from xbrowser

Getting selected row content from xbrowser

Postby sajith » Thu Mar 05, 2009 4:38 am

Hai,

Can any one help me to solve this Problem.I have a an xbrowser control populated using recordset.
My requirement is that when i double click on a particular row of the xbrowser i want to get that row content.
So that i can display that data on corresponding get control.


Regards
Sajith
sajith
 
Posts: 110
Joined: Wed Feb 18, 2009 9:58 am
Location: India

Re: Getting selected row content from xbrowser

Postby anserkk » Thu Mar 05, 2009 5:14 am

Sajith,

Why don't you try the following code assuming that the record pointer in the recordset moves simultaneously when you scroll thru the rows/records in xBrowse. I am not sure but you can give a try and please see that whether the GET is displaying the desired value. Also please let us know your feedback.

Code: Select all  Expand view
// Call the function to Edit the xBrowse Data on a Dialog when the user double click on xBrowse
oBrw:bLClicked := { | nRow, nCol | EditData(oBrw) }

//----------------------------------//
Function EditData(oBrw)
//----------------------------------//
Local oDlg,cCode,cName,oGetCode,oGetName

cCode:=oRecordSet:Filelds("Code"):Value
cName:=oRecordSet:Filelds("Name"):Value
DEFINE DIALOG oDlg TITLE "Test"

@1,1 GET oGetCode  VAR cCode of oDlg
@2,1 GET oGetName VAR cName of oDlg

ACTIVATE DIALOG oDlg
oBrw:Refresh()

Return NIL
 
Regards

Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Getting selected row content from xbrowser

Postby sajith » Thu Mar 05, 2009 7:41 am

Many thanks for ur great support :D
ur code works fine

Regards,
Sajith
sajith
 
Posts: 110
Joined: Wed Feb 18, 2009 9:58 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 100 guests