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. Quote 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? Quote 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 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 25, 2018 Share Posted June 25, 2018 Trial version? Quote Link to comment Share on other sites More sharing options...
przewa Posted June 25, 2018 Author Share Posted June 25, 2018 No, full. Quote 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/ Quote 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? Quote Link to comment Share on other sites More sharing options...
uniguisyriusz Posted June 26, 2018 Share Posted June 26, 2018 Any answer? Quote 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 Quote Link to comment Share on other sites More sharing options...
uniguisyriusz Posted June 26, 2018 Share Posted June 26, 2018 Its working! Thanks 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.