Jump to content
Software FX Community

Strange behavior when rendered as Image


conradcreel
 Share

Recommended Posts

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 

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...