conradcreel Posted July 5, 2007 Report Share Posted July 5, 2007 Consider this scenario: I have charts rendered as Images. I have the datagrid visible and there's 5 or more series. Everything displays fine until I try to use the scrollbar on the datagrid. The moment I do that, the data resets to the default unbound image. Any thoughts on this? This behavior actually happens whenever the user tries to interact with the chart (such as show/hide legend box, datagrid, etc.). Any help would be appreciated. Thank you, -- Conrad Quote Link to comment Share on other sites More sharing options...
Frank Posted July 5, 2007 Report Share Posted July 5, 2007 Looks like you have a problem with ViewState or with some code in your form_load. When you execute a command, it goes back to the server and loads the page. Please try with an empty web page with a default chart in it. If this one works fine, check the code in your For_Load as it may be incorrectly executing when the chart command is processed. Also check that EnableViewState is set to true. If you still can't figure out what the problem is, please post a Web Project that reproduces the problem. Quote Link to comment Share on other sites More sharing options...
conradcreel Posted July 5, 2007 Author Report Share Posted July 5, 2007 I have a set of user controls with stuff like date ranges and other parameters. In the prerender method (after a postback from a user control), I then call a method in my BLL which returns a datatable that I use as the datasource of the Chart. Since you bring up ViewState, that's probably it as it doesn't make another call to the BLL, so it makes sense that the data is lost. I'll just try storing the datatable in the ViewState and binding to the chart from there. Thanks, that helps. Quote Link to comment Share on other sites More sharing options...
Frank Posted July 9, 2007 Report Share Posted July 9, 2007 Sounds like a good plan. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.