In my app I am using a dialog with 2 xBrowse's on it.
xBrowse 1 (oBrwUsers) will display the user's list
xBrowse 2 (oBrwMenu) will display the Menu's available to the user
Wne the user moves thru the xBrowse 1, xBrowse 2 should update/refresh the menu's available to the user
In xBrowse 1 (oBrwUsers), I am using ADO RecordSet
In xBrowse 2 (oBrwMenu), I am using an array
Screen Snapshot
My problem is that xBrowse 2 is not getting refreshed when the user moves thru xBrowse 1
On xBrowse 1's bChange I have used the following code
- Code: Select all Expand view
oBrwUsers:bChange:={ || nUserId:=oUsers:oRecSet:Fields("User_Id"):Value,;
// func GetUserMenu() will erase the array aMenu and creates a Fresh array, aMenu is the array used in xBrowse2 GetUserMenu(oUserMenu,oMenuArray,nUserId,@aMenu),;
oBrwMenu:Update(),;
oBrwMenu:Refresh(),;
oDlg:UpDate() }
I have checked and found that Function GetUserMenu(oUserMenu,oMenuArray,nUserId,@aMenu) is creating the array perfectly with all the required data. But xBrowse not getting refreshed with the new updataed array data
Code to create xBrowse 2 (oBrwMenu)
@ 0,100 XBROWSE oBrwMenu ;
COLUMNS 2, 3 ;
HEADERS "Menu", "Status" ;
OF oDlg ;
ARRAY aMenu // should not use AUTOCOLS now
*oBrwMenu:SetArray( aMenu,.F. )
oBrwMenu:lUpdate := .t.
oBrwMenu:nColSel := 2
oBrwMenu:aCols[ 1 ]:nWidth:=330
oBrwMenu:aCols[ 2 ]:SetCheck( { "CheckOn", "CheckOff" } )
oBrwMenu:aCols[ 2 ]:bStrData:=NIL
Any Idea where I have went wrong ?
Regards
Anser