DEV_THS Posted April 4, 2019 Share Posted April 4, 2019 Hello, I would like to know how to set the ColumnHideable property at run time: = False uniDbGrid1.Columns [index] .Menu.ColumnHideable: = False; Thank you! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 4, 2019 Share Posted April 4, 2019 Hello, One possible solution I think UniDBGrid1.JSInterface.JSAssign('hideable', [False], UniDBGrid1.Columns[1].JSColumn); UniDBGrid1.JSInterface.JSAssign('hideable', [True], UniDBGrid1.Columns[1].JSColumn); Quote Link to comment Share on other sites More sharing options...
DEV_THS Posted April 4, 2019 Author Share Posted April 4, 2019 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. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 4, 2019 Share Posted April 4, 2019 5 minutes ago, DEV_THS said: in my case I do not want any of my columns to have this option. Or do you want to completely hide the menu? Quote Link to comment Share on other sites More sharing options...
DEV_THS Posted April 4, 2019 Author Share Posted April 4, 2019 6 minutes ago, Sherzod said: Or do you want to completely hide the menu? I want to hide completely from the menu, I do not want to make this available to my user ... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 4, 2019 Share Posted April 4, 2019 40 minutes ago, DEV_THS said: uniDbGrid1.Columns [index] .Menu.ColumnHideable: = False; Have you tried with? uniDbGrid1.Columns[index].Menu.MenuEnabled := False; Quote Link to comment Share on other sites More sharing options...
DEV_THS Posted April 4, 2019 Author Share Posted April 4, 2019 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. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 4, 2019 Share Posted April 4, 2019 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; Quote Link to comment Share on other sites More sharing options...
DEV_THS Posted April 4, 2019 Author Share Posted April 4, 2019 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! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 4, 2019 Share Posted April 4, 2019 Thank you Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.