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
20
Conditional Formatting dialog at runtime
posted

Hi,

 

We need to implement a design mode where our users should be able to customize the conditional formatting on the columns of the grid.

Infragistics already has a complete conditional formatting dialog which can be used at design time, but is it also possible to popup this dialog at runtime?

I am referring to this document:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.3/CLR2.0/html/Win_Implementing_Conditional_Formatting_at_Design_Time.html

  • 37774
    Suggested Answer
    posted

    To use that dialog at run-time, you will need to add a reference to the SupportDialogs assembly to your project.  Then you could do something like:

    private void button1_Click(object sender, EventArgs e)
    {
        UltraGridColumn column = this.ultraGrid1.DisplayLayout.Bands[0].Columns[0];
        ConditionValueAppearanceForm form = new ConditionValueAppearanceForm(column);
        if (DialogResult.OK == form.ShowDialog(this))
        {
            column.ValueBasedAppearance = form.ConditionValueAppearance;
        }
    }

    -Matt