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

RadProgressBar asp.net does not repaint/rebind value

1 Answer 98 Views
ProgressBar
This is a migrated thread and some comments may be shown as answers.
Pramod
Top achievements
Rank 1
Pramod asked on 04 May 2015, 03:02 PM

Hi,

I am developing many widgets on one screen. I have used MVP DP so whether or not to create instances of widgets (maybe based on role) are determined by presenter.

One control is RadHtmlChart:PieSeries which also has <asp:Timer> and the other is RadProgressBar. 
The Timer postbacks the entire page, not just the PieControl which is OK.

This is the presenter.cs code for the PieSeries which correctly repaints the UI when the timer goes off.
The presenter.cs code for the ProgressBar is identical.
However, it only works the first time databind. Every other postback the new "PercentagteValue" is assigned correctly but the control doesn't seem to overwrite it's older value. 

For now i got it to work by declaratively creating the control on the widget page instead of dynamically creating it in the presenter.

I've seen posts on set_value using javascript but was wondering why these two controls act differently?

public async Task GetPieSnapShot()
{
   IEnumerable<PieData> pieResult = await Model.GetPieData();
   PieSeries myPieControl = (PieSeries)LoadControl("~/UserControls/PieSeriesControl.ascx");
   myPieControl.DataSource = pieResult.ToList();
   View.PieWidget = myPieControl;
}

 

 

1 Answer, 1 is accepted

Sort by
0
Pramod
Top achievements
Rank 1
answered on 04 May 2015, 03:57 PM

I now stumbled across the older thread.
http://www.telerik.com/forums/setting-the-value-from-codebehind#xOVwa-aX20S-E6zGyjodlA

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