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

Adding RadProgressBar runtime fails

1 Answer 110 Views
ProgressBar
This is a migrated thread and some comments may be shown as answers.
Benny
Top achievements
Rank 1
Benny asked on 10 Sep 2012, 01:11 PM
Hi Telerik forum.

I'm trying to add a number of RadProgressBars to another control like a RadGroupBox or a RadPageViewPage.

The RadProgressBar is actually added, but is not visible! I then tried to set .Visible = true and .BringToFront() but no luck;

In pasted code I'm trying to load a RadGroupBox, and a loop of the RadGroupBox's controls show that they are actually added but yet invisible. Only if I set the .Dock = DockStyle.Fill it will show up.
The groupbox is big enough to contain the 2 expected radprogressbar items

The OrderList contains 2 Orders. 
What have I missed here?  By using a microsoft groupbox + microsoft progressbar is works, but for this radcontrol is seems not to work

grpActiveOrders.Controls.Clear();
 
      RadProgressBar pgb;
      int h = 20;
      foreach (Order order in OrderList)
      {
          //Add progressbar runtime and load with order status data
          pgb = new RadProgressBar();
          pgb.Text = order.RecipeName.Trim();
          pgb.Maximum = order.OrderBatchTotal;
          pgb.Value1 = order.OrderCalcultatedStatus;
          pgb.Width = 195;
          pgb.Left = 10;
          pgb.Top = h;
          grpActiveOrders.Controls.Add(pgb);
 
          h += 40;
      }

1 Answer, 1 is accepted

Sort by
0
Benny
Top achievements
Rank 1
answered on 10 Sep 2012, 01:53 PM
Found the solution:
The Height must be set!  .Height = 20;
The microsoft  progressbar has a default height and width, but RadProgressBar must have these properties set
Sorry for inconvinience!

Tags
ProgressBar
Asked by
Benny
Top achievements
Rank 1
Answers by
Benny
Top achievements
Rank 1
Share this question
or