Mike Posted March 21, 2017 Share Posted March 21, 2017 I can't find a readonly property in stringgrid columns. Is there a workaround to set some columns to readonly? Quote Link to comment Share on other sites More sharing options...
Mike Posted March 21, 2017 Author Share Posted March 21, 2017 Got a workaround but not yet satisfied. if Sender is TuniStringGrid then if LowerCase(EventName) = 'beforeedit' then if TUniStringGrid(sender).Col <> 3 then begin TUniStringGrid(sender).Col := 3; TUniStringGrid(sender).Row := Params['R'].AsInteger; end; An editable column will be selected but shows a flickering in the screen. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 21, 2017 Share Posted March 21, 2017 Hi, Can you try this approach for now ?!: 1. UniStringGrid -> Options -> goEditing = true 2. UniStringGrid -> ExtEvents -> add event beforeedit function beforeedit(editor, context, eOpts) { if (context.column.dataIndex == "1") { return false; } } Best regards. Quote Link to comment Share on other sites More sharing options...
Mike Posted March 21, 2017 Author Share Posted March 21, 2017 Thank you! It works! 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.