How can I change the background color of a row depending on the data in form mode?
I see a graphic "Background". And in FillInData I can set the background, but seems it's overruled somewhere higher...
I can add an extra graphic "Background2", but then hi-lighting of the selected row stops working.
datagrid form background color by code
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: datagrid form background color by code
Hi rinzwind,
I'm afraid you have to choose: custom background color or alternating row colors!
Best
Klaus
I'm afraid you have to choose: custom background color or alternating row colors!

Best
Klaus
Re: datagrid form background color by code
Hi.
I was involved with a thread long ago where I suggested how useful it would be to have a "passThrough" property. One could overlay a control, like a transparent colored graphic, on top of another control, like a field, but any user action, like a mouseClick, would not be sent to that control, but would be sent to any underlying control.
This is different than simply passing "mouseUp", which works fine if there is nothing under the control; the message would pass naturally to the card. But if there is a control underneath, you currently have to kluge it.
I doubt I could find that thread. But I remember that the kluge was simply to pick up the clickLoc, and find a control whose rect contains it. With a dataGrid, you would loop through all the "fields". I believe in a DG those fields are the first ones in layer order, but in any case they are all named:
"Col 1 0001", "Col 1 002".."Col 2 001", "Col 2 002".etc.
You can then, in the graphic, send any message, or in your case "click at the loc of", the underlying control. Not too bad, really.
Craig Newman
I was involved with a thread long ago where I suggested how useful it would be to have a "passThrough" property. One could overlay a control, like a transparent colored graphic, on top of another control, like a field, but any user action, like a mouseClick, would not be sent to that control, but would be sent to any underlying control.
This is different than simply passing "mouseUp", which works fine if there is nothing under the control; the message would pass naturally to the card. But if there is a control underneath, you currently have to kluge it.
I doubt I could find that thread. But I remember that the kluge was simply to pick up the clickLoc, and find a control whose rect contains it. With a dataGrid, you would loop through all the "fields". I believe in a DG those fields are the first ones in layer order, but in any case they are all named:
"Col 1 0001", "Col 1 002".."Col 2 001", "Col 2 002".etc.
You can then, in the graphic, send any message, or in your case "click at the loc of", the underlying control. Not too bad, really.
Craig Newman
Re: datagrid form background color by code
Well, I just forget about the form datagrid and make one myself with a scrolling group since I don't need the datagrid features and I have full control that way. Works better to on mobile I think.