cdev Posted June 8, 2019 Share Posted June 8, 2019 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 More sharing options...
Sherzod Posted June 8, 2019 Share Posted June 8, 2019 40 minutes ago, cdev said: 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. Hi, http://forums.unigui.com/index.php?/topic/8070-event-for-hiding-column-in-dbgrid/&do=findComment&comment=41281 Link to comment Share on other sites More sharing options...
cdev Posted June 9, 2019 Author Share Posted June 9, 2019 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 More sharing options...
Sherzod Posted June 9, 2019 Share Posted June 9, 2019 Do you want to read this value from the clientside? Link to comment Share on other sites More sharing options...
cdev Posted June 9, 2019 Author Share Posted June 9, 2019 Yes, I want to store the column visibity of each column in cookies. When next time the user gets back to the grid, he gets his grid with the same visible columns as the previous time. Link to comment Share on other sites More sharing options...
Sherzod Posted June 9, 2019 Share Posted June 9, 2019 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 More sharing options...
cdev Posted June 10, 2019 Author Share Posted June 10, 2019 But how do I catch the event that a particular column has been marked visible/hidden ? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now