>>>Hi All,
>>>
>>>I have a two grids, one grid controls what is in the other grid, or is suppose to.
>>>
>>>the code I have in the AfterRowColChange method is this:
>>>
>>>LPARAMETERS nColIndex
>>>DODEFAULT()
>>>LOCAL llok, lcclient, laoption(1)
>>>lcclient = ccontact.clientid
>>>laoption[1] = ccontact.contactid
>>>THISFORM.cpageframe1.page1.grid2.RECORDSOURCE = ""
>>>llok = settables(lcclient, THISFORM.DATASESSIONID, "CRACT", @laoption)
>>>THISFORM.resetgrids(.T.)
>>>SELECT 'crscustmer'
>>>THISFORM.REFRESH()
>>>
>>>
>>>Any ideas why it is not working for me?
>>>
>>>If I comment out everything, but the 1st two lines, the first grids shows that it is on the other records.
>>>
>>>TIA,
>>>Beth
>>
>>You should set focus to 'child' grid and then return it back to 'parent' grid.
>These are views, so that is not going to do anything - I think.
>My problem is that when I am getting the keys to grab the correct records, the keys are not right (ie Clientid and contactid) Contactid is showing the first record every time, not the record that the 1st grid moved to, like it is suppose to.
>
>Beth
I use this kind of interface all times, so I know what I am talking about. Besides setting focus you could rethink the way you handle grid recordsources. The best would be tying child grid to a cursor that will be created in Form.Load event and refilled from parent grid ARCC event. This way you don't need to switch recordsource.
Edward Pikman
Independent Consultant