Skip to main content

Cell / row invalidate causes application lag

Comments

1 comment

  • Dapfor Team

    Hi,
    Your example won’t work because you call Control.Invalidate() method inside of Control.OnPaint() message handler. You will also have an impact on the windows timer – it won’t work properly. We suggest you other solution:
    1. Set highlighting color to transparent – the grid will not highlight cells.
    2. In the callback Grid.RowUpdated you will get a notification from your business object and there you can highlight needed cells.

    Below is an example:


    grid1.Highlighting.Color = Color.Transparent;
    grid1.RowUpdated += delegate(object o, GridRowUpdateEventArgs e)
    {
    if (e.DataField.Id == "Name" || e.DataField.Id == "Time")
    {
    e.Row[e.DataField.Id].Highlight(TimeSpan.FromSeconds(1), Color.Green);
    }
    };


    Best regards,
    The Dapfor Team

    0

Please sign in to leave a comment.

Powered by Zendesk