PanelBar Issues with large # of items

4 posts, 0 answers
  1. noahshipley
    noahshipley avatar
    9 posts
    Member since:
    May 2007

    Posted 04 Feb 2008 Link to this post

    I am evalutating the RadControl set for purchase and am running into some shortcomings in the product;  I am trying to put roughly 1200 items into a panelbar (subdivided into 30 or so groups in a jagged manner), unfortunately this causes the bar to render completely wrong.  It's pretty disappointing if this control simply can't deal with large amounts of data, or is there something else I need to do other then just:

    private void RefreshAxisValues()
            {
                KeyValuePair<Dictionary<int, Axis>, Dictionary<int, AxisValue>> result = Simulation.GetAvailableAxisValues(m_CurrentSimulationID, null);

                m_pnlVariables.Items.Clear();

                Dictionary<int, List<AxisValue>> values = new Dictionary<int, List<AxisValue>>();           

                foreach (AxisValue value in result.Value.Values)
                {
                    if (!values.ContainsKey(value.AxisID))
                    {
                        values.Add(value.AxisID, new List<AxisValue>());
                    }

                    values[value.AxisID].Add(value);
                }

                foreach (int axisID in result.Key.Keys)
                {

                    RadPanelBarGroupElement axisGroup = new RadPanelBarGroupElement();
                    axisGroup.Caption = result.Key[axisID].Name;
                   
                    foreach (AxisValue value in values[axisID])
                    {
                        RadCheckBoxElement element = new RadCheckBoxElement();
                        element.Text = value.Value;
                        element.Tag = value;
                        element.IsChecked = true;

                        axisGroup.Items.Add(element);
                    }

                    axisGroup.Expanded = false;
                    axisGroup.AutoSize = true;
                    axisGroup.CollapseChildren(true);

                    m_pnlVariables.Items.Add(axisGroup);                       
                }
            }
  2. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 05 Feb 2008 Link to this post

    Hello Noah,

    Thank you for your valuable feedback.
    Could you please give me more information about this issue?
    The following would help me to reproduce and trace the problem:   
    • what is the style of RadPanelBar that you use 
    • what is exactly the glitch you see (a screenshot might be in help as well)
    If it is possible, please send me a very simple project, demonstrating the erroneous behavior which will help me to debug and test exactly what is happening.
     
    I'm looking forward to your reply.

    Regards,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. noahshipley
    noahshipley avatar
    9 posts
    Member since:
    May 2007

    Posted 05 Feb 2008 Link to this post

    It is very easy to repro the issue, I simply created a new project, dropped a new RadPanelBar onto the form and made it fairly large, here's some code to easily repro it:


        private void Form1_Load(object sender, EventArgs e)
            {
                Random r = new Random();

                for (char c = 'a'; c <= 'z'; c++)
                {
                    RadPanelBarGroupElement axisGroup = new RadPanelBarGroupElement();
                    axisGroup.Caption = c.ToString();

                    for (int i = 0; i < r.Next(50); i++)
                    {
                        RadCheckBoxElement element = new RadCheckBoxElement();
                        element.Text = "Test_" + i;
                        element.IsChecked = true;

                        axisGroup.Items.Add(element);
                    }

                    axisGroup.Expanded = false;
                    axisGroup.AutoSize = true;
                   
                    m_PanelBar.Items.Add(axisGroup);

                    axisGroup.CollapseChildren(true);
                }
            }
       
    Basically the issue is that the control renders erratically and incorrectly with large numbers of items.
  5. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 05 Feb 2008 Link to this post

    Hello noahshipley,

    I was able to reproduce this issue and I will do my best to fix it as soon as possible. The problem seems to be related to the layout logic used in the control and it would take some time to be fixed. Your points have been updated for reporting the bug.

    Please feel free to write me if something else pops up.


    Kind regards,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top