Jump to content

the FixedCells of StringGrid can be edited, how to resolve?


huangrenping

Recommended Posts

 

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. 

Link to comment
Share on other sites

 

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.

Link to comment
Share on other sites

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...
Link to comment
Share on other sites

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...

  • Upvote 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...