Jump to content

Hide Columns in DBGrid row editing


skafy

Recommended Posts

Hi,

 

Is it possible for dbgrid row editing to hide some edit cells when dbclick on row. 

 

Now when i load dataset before showing form I hide first three columns. (some id columns). Then When I dbclick on row it begins showing cells for those hidden columns. 

post-3774-0-00406200-1499327481_thumb.png

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

Have you tried it yet?

 

Sorry for the delay,

 

Can you try this approach for now ?!:

procedure TMainForm.UniFormCreate(Sender: TObject);
var
  DataSource: TDataSource;
  DataSet: TClientDataSet;
begin
  with UniDBGrid1 do
    JSInterface.JSAddListener('reconfigure', JSControl.JSFunction('me', 'if (me.getPlugin("uniGridEditor")) me.getPlugin("uniGridEditor").editor=null'));

  try
    DataSet:= TClientDataSet.Create(Application);
    DataSet.FieldDefs.Add('ID', ftInteger, 0, False);
    DataSet.FieldDefs.Add('ID2', ftInteger, 0, False);
    DataSet.FieldDefs.Add('ID3', ftInteger, 0, False);
    ...

Best regards,

Link to comment
Share on other sites

DD this solution works. Thank you.

 

Hi,

 

 

Sorry for the delay,

 

Can you try this approach for now ?!:

procedure TMainForm.UniFormCreate(Sender: TObject);
var
  DataSource: TDataSource;
  DataSet: TClientDataSet;
begin
  with UniDBGrid1 do
    JSInterface.JSAddListener('reconfigure', JSControl.JSFunction('me', 'if (me.getPlugin("uniGridEditor")) me.getPlugin("uniGridEditor").editor=null'));

  try
    DataSet:= TClientDataSet.Create(Application);
    DataSet.FieldDefs.Add('ID', ftInteger, 0, False);
    DataSet.FieldDefs.Add('ID2', ftInteger, 0, False);
    DataSet.FieldDefs.Add('ID3', ftInteger, 0, False);
    ...

Best regards,

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...