This is a migrated thread and some comments may be shown as answers.

Items redraw slow after enabling RadPanel

3 Answers 126 Views
Panel
This is a migrated thread and some comments may be shown as answers.
Rok
Top achievements
Rank 1
Rok asked on 23 Dec 2010, 03:35 PM
Hi!

I am using RadPanel as a container for 8 buttons (generic winforms buttons) and use it to enable or disable all the buttons at once. The problem that I am facing is, that after enabling the panel, buttons are not drawn as enabled immediately, but are drawn as enabled in a haphazard manner (eg.: first two buttons are drawn as enabled, followed by 3 other buttons, etc). On a generic panel buttons are drawn immediately without any extra settings, so my question is, how can I enable the same behavior on RadPanel? I tried doing Refresh immediately after enabling the panel, as well as enabling double buffering, but it didn't help. I am using version 2010.3.10.1109 of WinForms.

3 Answers, 1 is accepted

Sort by
0
Accepted
Ivan Todorov
Telerik team
answered on 28 Dec 2010, 10:09 AM
Hi Rok,

Thank you for contacting us.

There seems to be a performance issue with drawing the RadPanel's child controls. I was able to achieve the described behavior when I added over 100 buttons. With only 8 buttons on the panel everything looked fine. The following workaround did the trick for me. Please refer to the code snippet below (I suppose that you are enabling the panel on a click of a button) :

private void radButton1_Click(object sender, EventArgs e)
{
    if (this.radPanel1.Enabled)
    {
        this.radPanel1.Enabled = false;
    }
    else
    {
        this.radPanel1.Visible = false;
        this.radPanel1.Enabled = true;
        this.radPanel1.Visible = true;
    }
}

This issue has been added to PITS issues. You can follow the PITS Issue by its ID: 4466

Thank you for bringing our attention to this issue. Your Telerik points have been updated.

Let me know if this helped you. Should you need further help, do not hesitate to contact us.

Best wishes,
Ivan Todorov
the Telerik team
Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
0
Rok
Top achievements
Rank 1
answered on 28 Dec 2010, 01:23 PM
Hi Ivan,

Yes your workaround seems to work. As for getting the same results as me, try using generic winforms buttons in an generic winform window with radPanel. I tried using Telerik buttons and with 8 buttons the effect was not noticeable. I also noticed, that the order in which buttons were refreshed, depended on the order they were added to radPanels controls collection, so buttons are not redrawn in a haphazard manner.
0
Ivan Todorov
Telerik team
answered on 29 Dec 2010, 06:14 PM
Hi Rok,

I am glad to hear that the issue is solved now.

I tried the idea with generic buttons as I was writing my previous message. The effect was hardly noticeable with just eight buttons but was present. This might be due to hardware differences. However, when I added more buttons I could clearly see how the buttons were not drawn at the same time. I logged the issue in our bug tracking system and we will address it in one of our upcoming releases.

Have a happy holidays!

Regards,
Ivan Todorov
the Telerik team
Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
Tags
Panel
Asked by
Rok
Top achievements
Rank 1
Answers by
Ivan Todorov
Telerik team
Rok
Top achievements
Rank 1
Share this question
or