This is a migrated thread and some comments may be shown as answers.
DataBind Issue
2 Answers 28 Views
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 19 Feb 2010, 11:41 AM
Hi,

I have a chart -

<telerik:RadChart ID="RadChart1" runat="server" ChartImageFormat="Jpeg" Height="500px" 
                Width="1400px" DefaultType="Line" Skin="Office2007">  
                <Series> 
                    <telerik:ChartSeries DataXColumn="OAdate" DataYColumn="nosearches" Name="User Visits" 
                        Appearance-LineSeriesAppearance-Width="2" Type="Line">  
                        <Appearance> 
                            <FillStyle FillType="Solid" MainColor="69, 115, 167">  
                            </FillStyle> 
                            <TextAppearance TextProperties-Color="Black">  
                            </TextAppearance> 
                            <Border Color="69, 115, 167" /> 
                        </Appearance> 
                    </telerik:ChartSeries> 
                    <%--                <telerik:ChartSeries DataXColumn="OAdate" DataYColumn="errorscount" Name="Errors" 
                    Appearance-LineSeriesAppearance-Width="10" Type="Line">  
                    <Appearance> 
                        <LineSeriesAppearance Width="1" /> 
                        <FillStyle MainColor="Black" /> 
                    </Appearance> 
                </telerik:ChartSeries> 
--%> 
                </Series> 
                <PlotArea> 
                    <XAxis AutoScale="true" IsZeroBased="false">  
                        <Appearance ValueFormat="ShortDate" CustomFormat="" Color="134, 134, 134" MajorTick-Color="134, 134, 134">  
                            <MajorGridLines Color="134, 134, 134" Width="0" /> 
                            <TextAppearance TextProperties-Color="Black">  
                            </TextAppearance> 
                        </Appearance> 
                        <AxisLabel> 
                            <TextBlock> 
                                <Appearance TextProperties-Color="Black">  
                                </Appearance> 
                            </TextBlock> 
                        </AxisLabel> 
                    </XAxis> 
                    <YAxis> 
                        <Appearance Color="134, 134, 134" MajorTick-Color="134, 134, 134" MinorTick-Color="134, 134, 134">  
                            <MajorGridLines Color="134, 134, 134" /> 
                            <MinorGridLines Color="134, 134, 134" /> 
                            <TextAppearance TextProperties-Color="Black">  
                            </TextAppearance> 
                        </Appearance> 
                        <AxisLabel> 
                            <TextBlock> 
                                <Appearance TextProperties-Color="Black">  
                                </Appearance> 
                            </TextBlock> 
                        </AxisLabel> 
                    </YAxis> 
                    <Appearance Dimensions-Margins="5%, 5%, 5%, 5%">  
                        <FillStyle FillType="Solid" MainColor="">  
                        </FillStyle> 
                    </Appearance> 
                </PlotArea> 
                <Appearance> 
                    <Border Color="134, 134, 134" /> 
                </Appearance> 
                <ChartTitle> 
                    <Appearance> 
                        <FillStyle MainColor="">  
                        </FillStyle> 
                    </Appearance> 
                    <TextBlock> 
                        <Appearance TextProperties-Color="Black" TextProperties-Font="Arial, 18px">  
                        </Appearance> 
                    </TextBlock> 
                </ChartTitle> 
                <Legend> 
                    <Appearance Dimensions-Margins="15%, 2%, 1px, 1px" Dimensions-Paddings="2px, 8px, 6px, 3px">  
                        <ItemTextAppearance TextProperties-Color="Black">  
                        </ItemTextAppearance> 
                        <ItemMarkerAppearance Figure="Square">  
                        </ItemMarkerAppearance> 
                    </Appearance> 
                </Legend> 
            </telerik:RadChart> 

Which displays fine on first databind, but on rebinding with new data on this button press the old chart stays on screen?

protected void searchButton_Click(object sender, EventArgs e)  
    {  
        Report report = new Report();  
        RadChart1.DataSource = report.RetrieveSSPhraseDailysp(keyword, 99, 1, fromRadDatePicker.SelectedDate, toRadDatePicker.SelectedDate);  
        RadChart1.DataBind();  
 
        phraseGridView.Rebind();  
    } 

What am i doing wrong?

Thanks
Matt

2 Answers, 1 is accepted

Sort by
0
Accepted
Ves
Telerik team
answered on 24 Feb 2010, 11:47 AM
Hello Matthew,

I can see you are using a gridview too. Does it display the new values? Can you please attach a runnable page (you can use a dummy datasource or an in-memory datatable), which reproduces it, so we can debug it and get back to you? Thanks.

Best regards,
Ves
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Matt
Top achievements
Rank 1
answered on 25 Feb 2010, 09:32 AM
Hi Ves,

My Bad!!!

I am using AjaxManager (newbie) AND I had not wired up the chart (as well as the grid which was working) to the Button press, your post triggered the realisation ;) workings beautifully now.

Thanks
Matt
Asked by
Matt
Top achievements
Rank 1
Answers by
Ves
Telerik team
Matt
Top achievements
Rank 1
Share this question
or