Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
135
OperatorCondition Refresh
posted

Hi,

I'm trying to convert the code I have in Initialize_Row handler for cells formatting  using the "new"(for me) OperatorCondition.

I've done something like this:

 

   Dim GestitaNonCondition As New Infragistics.Win.OperatorCondition(Infragistics.Win.ConditionOperator.Equals, 0)

        Dim AppearanceNonGestita As Infragistics.Win.Appearance = New Infragistics.Win.Appearance()

        Dim GestitaCondition As New Infragistics.Win.OperatorCondition(Infragistics.Win.ConditionOperator.Equals, 1)

        Dim AppearanceGestita As Infragistics.Win.Appearance = New Infragistics.Win.Appearance()

        AppearanceGestita.FontData.Bold = Infragistics.Win.DefaultableBoolean.False

        Dim ValAppearanceGestita As New Infragistics.Win.ConditionValueAppearance()

        ValAppearanceGestita.Add(GestitaNonCondition, AppearanceNonGestita)

        ValAppearanceGestita.Add(GestitaCondition, AppearanceGestita)

        Me.Grid.DisplayLayout.Bands(0).Columns("Gestita").ValueBasedAppearance = ValAppearanceGestita

Where "Gestita" is a flag that can be 0 or 1.

When I load the grid all works well.
Sometimes, in my application, Column "Gestita" change its value (due to a refresh event coming from a server) but its appearance remains the same.

Can anybody help me ?

 

  • 469350
    Suggested Answer
    Offline posted

    Hi,

    May I ask why you are changing the code?

    Using the InitializeRow event it no more or less efficient than using a ValueBasedAppearance, but it's a lot less code.

    ValueBasedAppearances are great if you need to set up your appearances at design-time, but setting them up at run-time is actually a lot more work than just using InitializeRow.

    Anyway... if the cell appearance is not refreshing, then my guess is that either your data source is not notifying the grid of the change, or else this is a bug in the grid.

    So what kind of data source are you using?

    And what version of the grid are you using? Do you have the latest service release? How to get the latest service release - Infragistics Community