Getting selected row content from xbrowser

Post Reply
sajith
Posts: 110
Joined: Wed Feb 18, 2009 9:58 am
Location: India
Contact:

Getting selected row content from xbrowser

Post by sajith »

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
User avatar
anserkk
Posts: 1280
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Getting selected row content from xbrowser

Post by anserkk »

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

// 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
sajith
Posts: 110
Joined: Wed Feb 18, 2009 9:58 am
Location: India
Contact:

Re: Getting selected row content from xbrowser

Post by sajith »

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

Regards,
Sajith
Post Reply