przewa Posted June 22, 2018 Share Posted June 22, 2018 Hi, is there a way to lock UniDbgrid column on runtime? For example onbuttonclick I wan't to lock first two columns. Link to comment Share on other sites More sharing options...
Sherzod Posted June 22, 2018 Share Posted June 22, 2018 Hi, Can you please specify which edition and build of UniGUI are you using? Link to comment Share on other sites More sharing options...
przewa Posted June 25, 2018 Author Share Posted June 25, 2018 Complete, Professional 1.10.0.1457 Link to comment Share on other sites More sharing options...
Sherzod Posted June 25, 2018 Share Posted June 25, 2018 Trial version? Link to comment Share on other sites More sharing options...
przewa Posted June 25, 2018 Author Share Posted June 25, 2018 No, full. Link to comment Share on other sites More sharing options...
Sherzod Posted June 25, 2018 Share Posted June 25, 2018 First of all please visit here: http://forums.unigui.com/index.php?/topic/6291-new-users-please-adjust-your-forum-email-address/ Link to comment Share on other sites More sharing options...
przewa Posted June 25, 2018 Author Share Posted June 25, 2018 Ok, I will do it. Can anyone answer my question? Link to comment Share on other sites More sharing options...
uniguisyriusz Posted June 26, 2018 Share Posted June 26, 2018 Any answer? Link to comment Share on other sites More sharing options...
Sherzod Posted June 26, 2018 Share Posted June 26, 2018 Hi, Any answer? One possible solution: 1. Type TExUniCustomDBGrid = class (TUniCustomDBGrid) end; 2. UniDBGrid1 -> ClientEvents -> UniEvents -> function beforeInit: function beforeInit(sender, config) { config.enableLocking=true; } 3. How to use: procedure TMainForm.UniButton1Click(Sender: TObject); var grid: TUniDBGrid; begin grid := UniDBGrid1; with grid do begin Columns[0].Locked := True; TExUniCustomDBGrid(grid).DoConfigureJSColumns(grid.DataSource.DataSet); JSInterface.JSCall('view.refresh', []); end; end; 1 Link to comment Share on other sites More sharing options...
uniguisyriusz Posted June 26, 2018 Share Posted June 26, 2018 Its working! Thanks 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