| Subject |
Re: Grid Fieldname |
| From |
Akshat Kapoor <akshat.kapoor@kapoorsons.in> |
| Date |
Sat, 30 Apr 2022 13:14:40 +0530 |
| Newsgroups |
dbase.getting-started |
Good Afternoon Rob,
> I have a grid with beforecellpaint case statement attached to it.
> works exactly as planned.
> I now want to add to my case statement if the fieldname is eg "Mond1","Tued1" and the case statement does not cover it to change the color for it.
> I'm trying to achieve a color for M-F and a color for WE.
> Any suggestions are welcome
BeforeCellPaint is attached to a specific column.
So if you want to add for a new column then it will have to be added for
that column as a separate call.
with (columns["COLUMN3"].editorControl)
beforeCellPaint = class::EDITORCONTROL_BEFORECELLPAINT
endwith
The code designer streamed out for me and is working well.
The function call
function editorControl_beforeCellPaint(bSelectedRow)
if
this.parent.parent.invedatamodule1.inve.rowset.fields["clearance"].value=1
if.not.bSelectedRow
this.colorNormal = clea_colour
else
this.colornormal = clea_colour2
endif
else
if.not.bSelectedRow
this.colornormal = ""
endif
endif
return true
Now if you want to use the same function for 2 columns then it will need
some experimentation.
I tried
?this.parent.dataLink
But it gave Object
Unable to get any meaningful info.
Have not been able to experiment much. Will post if I achieve some success.
Regards
Akshat
|
|