patelajk Posted August 28, 2008 Report Share Posted August 28, 2008 Hi I keep on getting duplicate title names on a graph.... basically I am trying to create the Chart title dynamically depending on what the user has chosen from a dropdown menu. so if they have selected Buyout from the drop down and they click "Chart" then the chart title should read Buyout, if they select venture then the chart tiel should read Venture. Problem is when they first go and select the from the drop down it the chart titles is correct but when they go and select another option from the drop down it the chart title becomes the previous chart title remains and it also shows the new one they have selected. E.g. I go intot the page and I select Venture from the drop down and hit Chart then Venture will show on the chart title, if i then decide select Buyout from the drop down it will show the Venture and Buyout in the title (the data changes fine its just the titles that are causing the problem.) I hae tried puttinng a "If not page.ispostback" around the code but it still won't work. Any ideas: Dim td as New TitleDockable()td.Font = New Font("Arial", 12, FontStyle.Bold)td.TextColor = Color.DarkBluetd.Text = ChartTitleType(criteria_type) & " - " & " " & ChartTitleRegion(criteria_type) & ": Median IRR"Chart1.Titles.Add(td) Quote Link to comment Share on other sites More sharing options...
Frank Posted August 28, 2008 Report Share Posted August 28, 2008 If this code is in the FormLoad, you need to do it only if is NOT a postback, otherwise you will end-up with another title, one coming from the ViewState and the one you are adding with this code. Quote Link to comment Share on other sites More sharing options...
patelajk Posted August 28, 2008 Author Report Share Posted August 28, 2008 the code is in the Not ispostback but am still getting the problem Quote Link to comment Share on other sites More sharing options...
Frank Posted August 28, 2008 Report Share Posted August 28, 2008 Please include a sample app that reproduces the problem. 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.