RadProgressBar asp.net does not repaint/rebind value

2 posts, 0 answers
  1. Pramod
    Pramod avatar
    6 posts
    Member since:
    Mar 2014

    Posted 04 May 2015 Link to this post

    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;
    }

     

     

  2. Pramod
    Pramod avatar
    6 posts
    Member since:
    Mar 2014

    Posted 04 May 2015 Link to this post

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

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top