Jun
1
Written by:
Steve Gray
6/1/2010 5:05 PM
This will walk you through setting up a format condition in a Janus grid
'get a reference to the target column
Dim c As Janus.Windows.GridEX.GridEXColumn = GridEX1.RootTable.Columns("sopnumbe")
'create the format condition
Dim fc As Janus.Windows.GridEX.GridEXFormatCondition = New Janus.Windows.GridEX.GridEXFormatCondition(c, Janus.Windows.GridEX.ConditionOperator.LessThan, "#")
'set up the formatting
fc.FormatStyle.ForeColor = Color.Gray
'add the format to the grid
Me.GridEX1.RootTable.FormatConditions.Add(fc)
'bind the grid
Me.GridEX1.DataSource = SPs.FP_RM20101_SEL_byCustomer(strCustomer, appuser.Database).getTable
The one comment that I have is that I struggle with getting the grid to recognize a column that I’ve set to “”. ‘isEmpty’ doesn’t get it, and “Equals” “” doesn’t work. Here, I’ve set it to “Less than ‘#’”. Not pretty, but it works.
As always, I welcome your comments!