Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Different ReadOnly in Grids?

Status
Not open for further replies.

mkendi

Programmer
Oct 21, 2000
82
TR

This code (InitEvent of the Grid) ends with a ReadOnly Column:

THIS.Column1.Header1.CAPTION = ""
THIS.Column1.WIDTH = 40
THIS.Column1.CONTROLSOURCE = "TableXYZ.abc"
THIS.column1.ReadOnly = TRUE


This code doesn't end with a ReadOnly Column:

THIS.Column1.Header1.CAPTION = ""
THIS.Column1.WIDTH = 40
THIS.Column1.CONTROLSOURCE = "TableXYZ.abc"
THIS.column1.Text1.ReadOnly = TRUE

No problem to write for each column this line of code, but it would be nice to know, why the grids behavior is not the same.

Thanks in advance



 
No problem to write for each column this line of code, but it would be nice to know, why the grids behavior is not the same.

Not the same as what?



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Not the same behavior:

THIS.column1.ReadOnly = TRUE
THIS.column1.Text1.ReadOnly = TRUE
 
Or say it other words:

THIS.column1.ReadOnly = TRUE ==> YES, indeed readonly
THIS.column1.Text1.ReadOnly = TRUE ==> NO, column is not readonly

 
THIS.column1.ReadOnly = TRUE

Shouldn't this read THIS.column1.ReadOnly = .T.

I still have problem understaning your question.

THIS.column1.ReadOnly = TRUE ==> YES, indeed readonly
THIS.column1.Text1.ReadOnly = TRUE ==> NO, column is not readonly

This is by design. I goes in order Grid->column->Textbox.
1. If you want the hole grid disabled, disable the grid, everything else below that (columns and texboxed) will be disabled.
2. If you just want one or two columns disabled, just set the read-only = .t. to the appropriate columns.




Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top