Highlighting Data in a Bound Table
Posted: Thu Nov 07, 2013 2:29 am
Hi all.
I can’t see anything obvious in the doco or forum or examples… apologies if I’ve missed something… but has anybody found a neat way to highlight data in a bound table?
For example, if I've got a local SQLite table of employees with employee number, name and salary, and that’s bound to a displayed table, is there a way that I can show the employee number value in RED if the salary is larger than 100,000?
My initial plan was to create an extra column in the SQLite table with a colour value for each row, then bind that colour value to the color property of the displayed table column;
#Com_Owner.Set_Binding Name('/Form.Fields.LIST_ONE.COL%1') Property(CONTENT.COLOR) BindToType(FLD) BindTo('COLColour')
But the syntax is obviously invalid - I get an error when I refresh the app. I suspect that I may not be allowed to bind to the color property. I note that this syntax works;
#Com_Owner.Set Property('/Form.Fields.LIST_ONE.COL%1.CONTENT.COLOR') To('BLUE')
But of course that effects the entire column – so, is there a way for me to set (on a row by row basis) the colour, or bold, or font size of data in a list… you see what I’m trying to do.
Also, on a vaguely related aside… it would also be really cool if I could do a similar thing with the disabled property of a textbox cell in a displayed table.
Anyway – any help or suggestions would be most welcome.
Cheers.
Marcus.
I can’t see anything obvious in the doco or forum or examples… apologies if I’ve missed something… but has anybody found a neat way to highlight data in a bound table?
For example, if I've got a local SQLite table of employees with employee number, name and salary, and that’s bound to a displayed table, is there a way that I can show the employee number value in RED if the salary is larger than 100,000?
My initial plan was to create an extra column in the SQLite table with a colour value for each row, then bind that colour value to the color property of the displayed table column;
#Com_Owner.Set_Binding Name('/Form.Fields.LIST_ONE.COL%1') Property(CONTENT.COLOR) BindToType(FLD) BindTo('COLColour')
But the syntax is obviously invalid - I get an error when I refresh the app. I suspect that I may not be allowed to bind to the color property. I note that this syntax works;
#Com_Owner.Set Property('/Form.Fields.LIST_ONE.COL%1.CONTENT.COLOR') To('BLUE')
But of course that effects the entire column – so, is there a way for me to set (on a row by row basis) the colour, or bold, or font size of data in a list… you see what I’m trying to do.
Also, on a vaguely related aside… it would also be really cool if I could do a similar thing with the disabled property of a textbox cell in a displayed table.
Anyway – any help or suggestions would be most welcome.
Cheers.
Marcus.