RulesManager - Excluding Footer

Posted by: santer.p75 on 23 September 2025, 4:17 am EST

  • Posted 23 September 2025, 4:17 am EST

    Hi,

    its there way to exclude a rule to the footer rows?

    for example:

    i have a rule that warns me when i leaf a cell with 0. The cell becomes a red background.

    But on the sum oft the column in the footer it could be a 0 becose 50+50-100 = 0

  • Posted 23 September 2025, 8:00 am EST

    Hello,

    You can handle ItemFormatting event of (IFormattableView)C1FlexGrid to cancel formatting for the footer row as follows:

        ((IFormattableView)c1FlexGrid1).ItemFormatting += Form1_ItemFormatting;
    }
    
    private void Form1_ItemFormatting(object sender, ItemFormattingEventArgs e)
    {
        if(e.Item == c1FlexGrid1.Rows.Count - 1)
        {
            e.Cancel = true;
        }
    }

    Please refer to the attached sample for implementation. (see RulesManager_Sample.zip)

    Regards,

    Uttkarsh.

  • Posted 23 September 2025, 8:25 am EST

    How do it on VB.net ItemFormatting?

  • Posted 24 September 2025, 12:00 am EST

    Hello,

    In VB.NET, it would be as follows:

        AddHandler DirectCast(C1FlexGrid1, IFormattableView).ItemFormatting, AddressOf FlexGrid_ItemFormatting
    End Sub
    
    Private Sub FlexGrid_ItemFormatting(sender As Object, e As ItemFormattingEventArgs)
        If e.Item = C1FlexGrid1.Rows.Count - 1 Then
            e.Cancel = True
        End If
    End Sub

    Please refer to the attached converted sample. (see Rules_Manager_Sample_VB.zip)

    Regards,

    Uttkarsh.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels