FormatCondtions

2 replies. Last post: February 1, 2010 8:48 AM by John Bonin
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
John BoninMember

I'm trying to set a FomatConditon based upon a value in the grid.  I've used both the designer and code and think I have come up with a bug.  If the Column that you are testing is NULL, then the Grid fails with an Object Refreence Not Set, but in my case it fails within my Master Page.  If I change the column I am looking at to one that doens't contain any NULL values then the format condition displays properly.

Heres the code

Protected Sub WebGrid1_InitializeLayout(ByVal sender As Object, ByVal e As ISNet.WebUI.WebGrid.LayoutEventArgs) Handles WebGrid1.InitializeLayout
        ' specific row     
        Dim a As WebGridFormatCondition = New WebGridFormatCondition()
        a.ColumnMember = "EXEMPTION_FLAG"
        a.ConditionText = "y"
        a.Name = "Format1"
        a.FormatStyle.CssClass = "flag"
        'a.FormatStyle.ForeColor = System.Drawing.Color.Red
        a.TargetObject = ISNet.WebUI.WebGrid.TargetObjectType.Row
        WebGrid1.RootTable.FormatConditions.Add(a)
    End Sub

The field EXEMPTION_FLAG maybe "y' but in most cases is NULL. 

Like I said if I change EXEMPTION_FLAG to another field that doesn't have any NULL's then it works.

 

Is this a bug or did I miss something?

 

I am using an ISDataSource looking at a DataSet for the data source of the grid.

 

Thanks

John

All times are GMT -5. The time now is 8:11 PM.
Previous Next