Link to home
Start Free TrialLog in
Avatar of Dovberman
DovbermanFlag for United States of America

asked on

How to refresh the ASP: Chart when the datasource for the chart series is modified.

This should be simple, but I am stuck.

I have a MS NET chart control whose series is based on a datasource.

I am resetting the datasource parameters.
then I would like the chart to redraw based on the datasource.

conStockSelect.Open();
            grdExceptions.SelectedValue.ToString();
            cmd.Parameters.Clear();
            cmd.Parameters.Add("@FromDate", SqlDbType.DateTime).Value = strFromDate;
            cmd.Parameters.Add("@ToDate", SqlDbType.DateTime).Value = strToDate;
            cmd.Parameters.Add("@SymbolID", SqlDbType.Int).Value = grdExceptions.SelectedValue.ToString();
            dscExceptionDetail.DataBind();
            // the chart does not change.
            //dscExceptionDetail is the datasource for Series1 of Chart2
            //Refresh the chart based on the new cmd parameter values
            // ????
Avatar of Praveen Venu
Praveen Venu
Flag of India image

Try to call the Refresh() of the Chart Control
ASKER CERTIFIED SOLUTION
Avatar of Dovberman
Dovberman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial