02-11-2024, 02:23 PM
Hi
I "fight"
against grid since I started working with IntraWeb. I guess the vcl-grids and the IW-grids are 2 different things.
In the meantime I use iwdbgrids only in readonly mode ; alway with TIWDBGridColumns for each column I want to show.
Without these , you don't habe a current record, the Grid don't synchronized with the Dataset.
One way to posit sync the grid and the dataset , I found here , was an on click event in grid Columns. Here you can lookup the value in your underlaying dataset.
iE.
void __fastcall TIWFrame2::IWDBGrid1Columns0Click(TObject *ASender, const UnicodeString AValue)
{
dstKnd->Lookup(AValue);
}
//---------------------------------------------------------------------------
Hope that helps...
I "fight"

In the meantime I use iwdbgrids only in readonly mode ; alway with TIWDBGridColumns for each column I want to show.
Without these , you don't habe a current record, the Grid don't synchronized with the Dataset.
One way to posit sync the grid and the dataset , I found here , was an on click event in grid Columns. Here you can lookup the value in your underlaying dataset.
iE.
void __fastcall TIWFrame2::IWDBGrid1Columns0Click(TObject *ASender, const UnicodeString AValue)
{
dstKnd->Lookup(AValue);
}
//---------------------------------------------------------------------------
Hope that helps...