Items redraw slow after enabling RadPanel

4 posts, 1 answers
  1. Rok
    Rok avatar
    3 posts
    Member since:
    Jan 2010

    Posted 23 Dec 2010 Link to this post

    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.
  2. Answer
    Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 28 Dec 2010 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Rok
    Rok avatar
    3 posts
    Member since:
    Jan 2010

    Posted 28 Dec 2010 Link to this post

    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.
  5. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 29 Dec 2010 Link to this post

    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.
Back to Top