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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...