huangrenping Posted December 4, 2013 Posted December 4, 2013 You can edit all cells of the stringgird contrains in unigui applications, how to resove? then I can use it like normal delphi applications? Quote
Sherzod Posted December 4, 2013 Posted December 4, 2013 Hi huangrenping. In designtimes: 1. UniStringGrid -> Options -> goEditing = true In runtimes: 1. Uses ... Vcl.Grids ... 2. UniStringGrid1.Options: = UniStringGrid1.Options + [goEditing]; Sincerely... Quote
huangrenping Posted December 5, 2013 Author Posted December 5, 2013 Hi huangrenping. In designtimes: 1. UniStringGrid -> Options -> goEditing = true In runtimes: 1. Uses ... Vcl.Grids ... 2. UniStringGrid1.Options: = UniStringGrid1.Options + [goEditing]; Sincerely... Thank you for your answer, It'll make fixed cells can not be edited, But also make other cells can not be edited. Quote
Sherzod Posted December 5, 2013 Posted December 5, 2013 Hi huangrenping. Sorry. Can clarify the issue? Quote
huangrenping Posted December 5, 2013 Author Posted December 5, 2013 Hi huangrenping. Sorry. Can clarify the issue? In designtimes, uniStringGrid's FixedRows and FixedCols are the same as normal StringGrid. but in runtimes as webmode, all cells of the unistringgrid are the same, they can be edited with options property of "UniStringGrid -> Options -> goEditing = true", and all can not be edited with "goEditing = False". And now, I just want to make FixedRows and FixedCols Can not be edited, no matter "goediting" be true or false. I'm sorry for my poor description. Quote
Sherzod Posted December 6, 2013 Posted December 6, 2013 In designtimes, uniStringGrid's FixedRows and FixedCols are the same as normal StringGrid. but in runtimes as webmode, all cells of the unistringgrid are the same, they can be edited with options property of "UniStringGrid -> Options -> goEditing = true", and all can not be edited with "goEditing = False". And now, I just want to make FixedRows and FixedCols Can not be edited, no matter "goediting" be true or false. I'm sorry for my poor description. Sorry I just didn't understand the question, now everything is clear. Now I will try to find a solution... Quote
Sherzod Posted December 6, 2013 Posted December 6, 2013 Solution: 1. UniStringGrid -> Options -> goEditing = true 2. UniStringGrid -> ExtEvents -> add event beforeedit function beforeedit(editor, context, eOpts) { var FixedRow, FixedCols; FixedRow = 1; FixedCols = 1; if (editor.cmp.uniRow < FixedRow || editor.cmp.uniCol < FixedCols) { return false; } } Sincerely... 1 Quote
Sherzod Posted December 6, 2013 Posted December 6, 2013 It can be used also in UniDBGrid, to lock some cells ... Quote
huangrenping Posted December 11, 2013 Author Posted December 11, 2013 It can be used also in UniDBGrid, to lock some cells ... wonderful, thank u. Quote
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.