I prefer to allow data editing in a edit page loaded after the grid page, by clicking on ID link. This is easier for me to check for validations into every controls. So I will show checkbox pictures in grids.
Thank you very much again!
My recommendation is that if you just want to display check status, don't use a checkbox but use an image. Something like this:
FUNCTION checkBoxValue() if isCheckedValue RETURN [<img src="images/checked.gif" />] endif *** Don't display anything for unchecked *** or alternately display a different image RETURN "" ENDFUNC
I think that checkboxes don't look neither nice nor serve a good purpose if you don't allow editing of them in the grid (which is actually not that easy to do unless you use AJAX callbacks anyway - using a separate page is a good choice IMHO).
+++ Rick ---
Wonderful!
1) Please, is it a way to make checkboxes read only in Grids? I would like to change their "checked" value in a edit page, not in a grid page.
2) Please, is it possible to write the DrawCheckBox function in Process.prg in order to use it even for other webpages? How would change the "this.Page." webpage syntax?
Thank you very much again
<ww:wwWebDataGridColumn id="wwWebDataGridColumn2" Expression="this.Page.DrawCheckBox()" />
You can then implement a page level function that produces the HTML for this control
FUNCTION DrawCheckBox() lcOutput = [<input type="checkbox" id="chkControl_] + TRANS(cursor.Id) + ; [" ] + iif(cursor.IsReqiured,[ checked="checked"],[]) + ; [/>] RETURN lcOutput ENDFUNC
More info here:
wcdocs:_1oj1boxsb.htm
+++ Rick ---