in
Forums
Blogs
DevExpress.com
Client Center
Support Center
DevExpress Channel

Callback and Refresh Options

Last post 6/27/2009 10:33 AM by Shane S.. 1 replies.
Sort Posts: Previous Next
  • 6/22/2009 12:32 AM

    Callback and Refresh Options

    First let me establish a little background on what I'm trying to achieve. 

    I have an ASP.NET page where approximately 20+ areas are shown.  For each area I would like to create a hover over popup with realtime callback refreshing.  On the popup it would show between 1 to 5 gauge controls (for different data points) and a line graph having all gauge points charted for the last 8 hours.  When attempting to do this I was thinking I could structure with an ASPxCallback panel having the 1-5 gauges and line chart all embedded on a ASPxPopupControl but soon ran into issues as follows:

    1. Had to add each gauge / chart with their own callback hook, otherwise created annoying flashing on UI.  If I call back on each gauge and chart, then the refresh was smooth.
    2. Having 20+ areas would result in somewhere around 100 callback hooked controls if I brute force implemented it this way.  Not to mention it increased the HTML produced to an astronomical size.
    3. If I wrapped it all into a single control, still required lots of code to be placed in code behind file, even though almost all items have the exact same method to pull the data.

    So what I was hoping to do is create a custom control wrapping in all the gauges and chart so that I can add just one to the screen and depending on the hover over, have the popup appear there and refresh.  My thought was the control would have an attribute field of something like DataPoints where you could set it to the points you cared about for a particular area like DataPoints="DP-123;DP-435;".  So for me to achieve this I need the following questions answered:

    • Can I hook the callback routines to objects other then the corresponding code behind files much like hooking other AJAX related calls to Web Service methods.  So for example, could I build into my custom control a means to retrieve it's own data.  Thus if I added the attribute of DataPoints="DP-123;DP-153;", this would mean I have 2 gauges and the chart.  The control then would know how to pull the 2 gauges current values and the line graph history.  This would make the control very much a reusable object.
    • Is there a way I can refresh the panel smoothly by simply refreshing at the callback panel level?  Today if I refresh at the callback panel, all the gauges and charts flash (even without loading panel).  If I place the callbacks on the gauges and charts, this is smooth with no flashing but then 5 times the callback hooks.
    • How can I re-use a single ASPxPopupControl for all 20+ points and just dynamically refresh?  So in the JavaScript call pass in the DataPoints and dynamically perform callback to immediately reconfigure control for that point.

    I realize without a full example, I'm not going to get a complete answer but for now I'm really looking for some pointers on what can and cannot be done and perhaps some references.

    Thanks, Shane

  • 6/27/2009 10:33 AM In reply to

    Re: Callback and Refresh Options

    OK, maybe the question is to long or maybe my minimal C# / .NET experience is coming through, but I know if I make an ascx in a web application, I can make callbacks back to the controls.  The problem comes in is we want to use these controls on multiple projects and therefore want to put the control into a base foundation project.  In this case the only option I have is to make an ASP .NET Server Control and in this case perhaps extend the Dev Express PopupControl.  My question is how can I make a callback from this type of control to either the control itself and a web service versus ASPX code behind files?

    Then the second key question is how to re-use a popup control through (i.e. one popup control for 25 points on a screen)?

    Anyhow I'm not expecting a huge example or some robust explaination, just for someone to point me in the right direction or tell me no can't be done.

     

    Thanx,

    Shane

Copyright © 1998-2010 Developer Express Inc.
ALL RIGHTS RESERVED