Jump to content

TUniDBGrid: How do I save column visibility in a cookie


cdev

Recommended Posts

Hi

I can save the column widths of a grid in a cookie.  Next time the user loads the application he gets his grid with the same column widths as he left the application.  I save the column width information in the OnColumnResize event handler of the grid and I load the column width information in the OnAfterLoad event handler of the grid.

Now, I want to do the same for the columns that are marked invisible or visible in runtime.  But I don't know in what event handler I can catch this.

Anyone has a clue how I could achieve this ?

Link to comment
Share on other sites

OK, I can catch these events in the ClientEvents columnhide and columnshow.    But now I have a new question: I have a global boolean in my unit bColumn0Visible.  How can I set that boolean to True or False from within these ClientEvents ?

Link to comment
Share on other sites

8 hours ago, Sherzod said:

Do you want to read this value from the clientside? 

You can assign your value to a new property ...

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  UniDBGrid1.JSInterface.JSAssign('needToSave', [True]);
end;

 

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