:: Visual Foxpro, Foxpro for DOS
select row datagrid and display in another datagrid
iara84
Автор

Сообщений: 1
Дата регистрации: 22.10.2022
when i select the first row it doesn't show only the data of the first row, it shows all the data of the table in the second datagrid

Add the following property to the form in the Init

ADDPROPERTY(Thisform,"returnobj", null )
in the edit button add the code

SELECT (thisform.Grid2.RecordSource) && selects the cursor area of ​​the grid control.
Thisform.ReturnObj = Newobject("Empty")
SCATTER NAME thisform.ReturnObj
Thisform.Release()
In the UNLOAD event of the grid form

RETURN Thisform.ReturnedObj
add this code to position the cursor in the first row of the datagrid, when selecting only the first row it appears in the second datagrid but it does not work. Create the property movefirstgrid and its default value will be .F in the form add to the click event

thisform.movefirstgrid=.T.
thisform.grdprices.setfocus
in the grid add to the setfocus event

if thisform.movefirstgrid
this.activatecell(1,1)
endif

thisform.movefirstgrid=.F.
in the second datagrid only the data of the first row is not show
Ratings: 0 negative/0 positive
Re: select row datagrid and display in another datagrid
Joys

Сообщений: 3511
Откуда: Старая Русса
Дата регистрации: 25.06.2000
Правила
Основной язык конференции- русский. Допускается использование любых других языков, если этого требует суть ответа (цитирование и т.д.) В противном случае ведение дискуссий на других языках будет расцениваться, как неуважительное отношение к участникам конференции.




Исправлено 1 раз(а). Последнее : Joys, 22.10.22 08:15
Ratings: 0 negative/0 positive


Эта тема закрыта.

On-line: 22 (Гостей: 22)

© 2000-2024 Fox Club 
Яндекс.Метрика