Ed did provide a straight forward solution using the Column
def red_negatives(self):
biz = self.Form.PrimaryBizobj
if biz.Record.total < 0:
return "red"
else:
return "white"
If you set the DynamicBackColor for all your grid columns to that
method, any rows with a negative value in the 'total' field will appear red,
and the rest will be white.
Thank Ed.
But you realized the problem immediately with issue of the row
selection. There is a second issue - the first row is grey-ed out if the
grid is not the active control. I can change the selection mode to
'cell' and that helps with both the grey-ed out issue and the row
selection except that the user can't determine which row they are on
(due to the selecting only one cell). I'm not completely sure how I
will handle this issue.
I might just change the fore color (font color) instead of the
background color. This will require I find a good combination of colors
that works (let's the user know what is required at a glance).
Or I could make further attempts at right to emulate the Fox grid which
uses a special indicator in the first column that tells the user that
the row is selected.
I really do not like using grids as record selectors.
Johnf
On 09/16/2012 06:24 AM, Nate Lowrie wrote:
Also, I think John is looking for a specific row, not a column. For instance,
you have a grid of Account Recievable and want to color red the order rows that
are past 30 days.
Regards,
Nate
On Sep 15, 2012, at 1:04 PM, Ed Leafe <[email protected]> wrote:
On Sep 15, 2012, at 10:41 AM, John Fabiani <[email protected]> wrote:
In Fox, you can set the row background color. Is there an easy to set
the background color of a row based on a field in the row (record) in dGrid?
BackColor is a property of a Column, so you would have to set the
DynamicBackColor for all the columns in the grid to the same function.
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]