Mike Posted July 10, 2017 Share Posted July 10, 2017 Hi, Is it possible to lock a picklist in a dbgrid so items can't be modified? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 10, 2017 Share Posted July 10, 2017 Hi, Do you mean the cell? Quote Link to comment Share on other sites More sharing options...
Mike Posted July 10, 2017 Author Share Posted July 10, 2017 Yes. If a picklist item is selected the text of the item shouldn't be modified. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 10, 2017 Share Posted July 10, 2017 Can you try this approach ?!: FormReady: procedure TMainForm.UniFormReady(Sender: TObject); begin // for example colIndx = 8 with UniDBGrid1 do JSInterface.JSCall('getEditor().setEditable', [False], Columns[8].JSColumn); end; Quote Link to comment Share on other sites More sharing options...
Mike Posted July 10, 2017 Author Share Posted July 10, 2017 Thank you! That did the trick. Works fine now. Quote Link to comment Share on other sites More sharing options...
Mike Posted November 2, 2017 Author Share Posted November 2, 2017 Hi, There is now an extra column which also must be set editable. How can I get this working? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 2, 2017 Share Posted November 2, 2017 Hi, Please explain Quote Link to comment Share on other sites More sharing options...
Mike Posted November 2, 2017 Author Share Posted November 2, 2017 Must correct. Should be not editable. I have a second picklist column. How can I set this also to not editable? Like below? with UniDBGrid1 dobegin JSInterface.JSCall('getEditor().setEditable', [False], Columns[8].JSColumn); JSInterface.JSCall('getEditor().setEditable', [False], Columns[9].JSColumn); end; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 2, 2017 Share Posted November 2, 2017 What problem do you have now ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 2, 2017 Share Posted November 2, 2017 Make a simple testcase for your issue if possible Quote Link to comment Share on other sites More sharing options...
Mike Posted November 2, 2017 Author Share Posted November 2, 2017 Forget my question It is not a picklist column. 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.