Subject | TIB_Grid display conversion |
---|---|
Author | sdbeames |
Post date | 2004-04-18T02:34:02Z |
Hi,
I can use the following to convert/format cells for display and
editing in a grid, but where/how can I reconvert the users changes
back into the dataset? OnSetEditText & OnSetColumnText don't seem
quite right.
void __fastcall TAdminForm::UsersGridGetDisplayText(TObject *Sender,
int ACol, int ARow, AnsiString &AString)
{
if (ACol > 7 && ARow > 0)
{
float fTime = StrToFloat(AString);
fTime /= 3600; // convert secs to hours
AString = FloatToStrF(fTime, ffFixed, 4, 2);
}
}
void __fastcall TAdminForm::UsersGridSetColumnText(TObject *Sender,
AnsiString &AString)
{}
void __fastcall TAdminForm::UsersGridSetEditText(TObject *Sender,
int ACol, int ARow, const AnsiString Value)
{}
Thank you,
Steve
IBO V4.3Ab_Test
I can use the following to convert/format cells for display and
editing in a grid, but where/how can I reconvert the users changes
back into the dataset? OnSetEditText & OnSetColumnText don't seem
quite right.
void __fastcall TAdminForm::UsersGridGetDisplayText(TObject *Sender,
int ACol, int ARow, AnsiString &AString)
{
if (ACol > 7 && ARow > 0)
{
float fTime = StrToFloat(AString);
fTime /= 3600; // convert secs to hours
AString = FloatToStrF(fTime, ffFixed, 4, 2);
}
}
void __fastcall TAdminForm::UsersGridSetColumnText(TObject *Sender,
AnsiString &AString)
{}
void __fastcall TAdminForm::UsersGridSetEditText(TObject *Sender,
int ACol, int ARow, const AnsiString Value)
{}
Thank you,
Steve
IBO V4.3Ab_Test