Topic: Grid and Sub-Grid

Good Afternoon, Dmitry,
I have a form with a tablegrid (tablegrid1),  a sub-tablegrid (tablegrid2) and a memo field.
I use a script to automatically highlight the first row of tablegrid1 but this does not automatically retrieve the related rows for tablegrid2 (screenshot1).  The related rows for tablegrid2 are only displayed once the User has clicked inside tablegrid1.
Is it possible to retrieve the related rows for tablegrid2 as soon as the first row of the tablegrid1 is highlighted by the script  so that the form displays like this (screenshot2) and the User does not have to click inside tablegrid1?
I have enclosed a zip file of my project so you can see the problem.
Thankyou,
Derek

Post's attachments

Attachment icon dmitry film club.zip 1.5 mb, 767 downloads since 2015-03-10 

Re: Grid and Sub-Grid

Hello,


Fixed:

Post's attachments

Attachment icon dmitry film club_fixed.zip 765.11 kb, 640 downloads since 2015-03-10 

Dmitry.

Re: Grid and Sub-Grid

Hi Dmitry,
Thank you again for your help;  it works perfectly now.
Derek.

Re: Grid and Sub-Grid

How To Auto load value Datagrid to combobox when
-click film
-click add film lating
-in combobox auto load value from datadrid to combobox

Post's attachments

Attachment icon 2015-03-13 Image 002.png 64.67 kb, 297 downloads since 2015-03-13 

My Visual Database : I Love You
Easy For Beginner Student For Me

Re: Grid and Sub-Grid

Hello Prahousefamily,

The way i autoload the value from the datagrid to the combobox is by a small script.

procedure form6_OnShow (Sender: string; Action: string);
begin
if Action = 'NewRecord' then  form6.ComboBox1.dbItemID := Form1.tablegrid1.dbItemID;
end;

Hope this helps.
Derek.