---
title: "关于点击按钮查询显示Dundas图报告Series[\"jjj\"]丢失情况的处理"
author: "winzenghua"
date: "2007-09-11T09:34:00Z"
tags: []
slug: "dundas-series-jjj"
draft: false
lastmod: "2007-09-11T09:34:00Z"
id: 952948
url: "https://java4gis.iteye.com/blog/952948"
---

问题：

在点击按钮查询显示Dundas图时，报错：Series\["jjj"]丢失。

查了一下错误日志：发现，在PostBack时，Series的状态丢失。

解决方案：

在Chart中加一个属性 CallbackStateContent="All" ，即可保存和恢复Series和DataPoint的所有状态。

相关文档：

```
public enum CallbackStateContent : <link tabindex="" keywords="frlrfSystemEnumClassTopic;System.Enum" errorurl="resolveh2link.html" indexmoniker="!DefaultAssociativeIndex" options="0">
```

# Members

Member Description **Auto** Automated selection of save/restore behaviour. **ChartStateOnly** Saves and restores the all chart state without series data points. **SeriesDataOnly** Saves and restores the only chart series data points. **All** Saves and restores the all chart state including series data points. **None** Saving and restoring will be not performed.

[]()

# Example

In this example, we set a charts CallbackStateConent property to SeriesDataOnly.

Visual Basic Copy Code `Imports Dundas.Charting.WebControl ... ' Sets the charts CallbackStateConent Property To SeriesDataOnly Chart1.CallbackStateContent = CallbackStateContent.SeriesDataOnly`

C# Copy Code `using Dundas.Charting.WebControl; ... // Sets the charts CallbackStateConent Property To SeriesDataOnly Chart1.CallbackStateContent = CallbackStateContent.SeriesDataOnly;`

# Remarks

The CallbackStateContent Auto works under folowing rules:

- **All** - if [UI]() is activated ([Toolbar]() and [context menu]()).
- **SeriesDataOnly** -if scrolling and zooming is enabled, and the particular series is not using data-binding.
- **None** - in all other cases including when user callback is used.

# Inheritance Hierarchy

&lt;link tabindex="" keywords="frlrfSystemObjectClassTopic;System.Object" errorurl="resolveh2link.html" indexmoniker="!DefaultAssociativeIndex" options="0"&gt;  
&lt;link tabindex="" keywords="frlrfSystemValueTypeClassTopic;System.ValueType" errorurl="resolveh2link.html" indexmoniker="!DefaultAssociativeIndex" options="0"&gt;  
&lt;link tabindex="" keywords="frlrfSystemEnumClassTopic;System.Enum" errorurl="resolveh2link.html" indexmoniker="!DefaultAssociativeIndex" options="0"&gt;  
**Dundas.Charting.WebControl.CallbackStateContent**