Jump to content

TUniDBGrid


DEV_THS

Recommended Posts

24 minutes ago, Sherzod said:

Hello,

One possible solution I think


UniDBGrid1.JSInterface.JSAssign('hideable', [False], UniDBGrid1.Columns[1].JSColumn);
UniDBGrid1.JSInterface.JSAssign('hideable', [True], UniDBGrid1.Columns[1].JSColumn);

 

Thank you very much Sherzod, I will adptar the code to always go through all my columns.

in my case I do not want any of my columns to have this option.

Thank you.

Link to comment
Share on other sites

9 minutes ago, Sherzod said:

Have you tried with?


uniDbGrid1.Columns[index].Menu.MenuEnabled := False;

 

Yes, my problem is that I do not create the columns, they are created dynamically when I open the dataset,

In this case, I'll need to create them to set this property of my column when I open the dataset, or at some point I'll have to run through the columns to make the command.

UniDBGrid1.JSInterface.JSAssign ('hideable', [False], UniDBGrid1.Columns [1] .JSColumn);

but I'm going to try to do the best I can here to stay cool ...

Thanks a lot for the help.

Link to comment
Share on other sites

4 hours ago, DEV_THS said:

I want to hide completely from the menu, I do not want to make this available to my user ...

For the grid header as a whole:

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  UniDBGrid1.JSInterface.JSConfig('enableColumnHide', [False]);
end;

 

Link to comment
Share on other sites

7 minutes ago, Sherzod said:

For the grid header as a whole:


procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  UniDBGrid1.JSInterface.JSConfig('enableColumnHide', [False]);
end;

 

Perfect Sherzod, helped me too! so I do not compromise the performance of my application!

Thank you very much!

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...