Topic: Editable Tablegrid options

Hello there, is it possible to edit JUST one specific collum on the tablegrid? (i'm talking about the allowedit tablegrid options)

Re: Editable Tablegrid options

Hello.


You can disable editing for specific columns:

procedure Form1_TableGrid1_OnChange (Sender: TObject);
begin
    Form1.TableGrid1.Columns[0].Options := Form1.TableGrid1.Columns[0].Options - coEditing;
    Form1.TableGrid1.Columns[1].Options := Form1.TableGrid1.Columns[1].Options - coEditing;
end;
Dmitry.

Re: Editable Tablegrid options

wow, fast reply! thanks!

Re: Editable Tablegrid options

btw you mean

    Form1.TableGrid1.Columns[0].Options := Form1.TableGrid1.Columns[0].Options - coEditing;
    Form1.TableGrid1.Columns[1].Options := Form1.TableGrid1.Columns[1].Options - coEditing;
and not gridsearch rigvht?

Re: Editable Tablegrid options

just mistake.

Dmitry.

Re: Editable Tablegrid options

One last question Dmitry, i have to save the tablegrid using a "save button" right?
i'm having problems with this... it gives me an sql error: Insert into orcproforma (the table is right) (id_orcproforma) this doesn't make sence , value 46
It should be insert into orcproforma id 46

Re: Editable Tablegrid options

No, editable TableGrid no need a save button.

Dmitry.

Re: Editable Tablegrid options

my mistake was, i used coediting and it enabled editing, only after using "allowedit" option on tablegrid coediting was used to disable editing

Re: Editable Tablegrid options

one last question dmitry, and sorry to bother you:

Is it possible to disable "allow empty" on the tablegrid? one of the editable options is a "combobox" with a table reference, and it allows me to pick a "blank" id

Re: Editable Tablegrid options

VascoMorais wrote:

one last question dmitry, and sorry to bother you:

Is it possible to disable "allow empty" on the tablegrid? one of the editable options is a "combobox" with a table reference, and it allows me to pick a "blank" id

Please download latest version again
http://myvisualdatabase.com/download/myvisualdb.exe


Now you can set property Not null for a field (on "Database tables" tab), when you try to add/edit value in a TableGrid and leave it empty, you will get popup hint that this value can't be empty.

Dmitry.