Hello,
1-I have a master page,
2-I have a user control for a webChart.
I want to use WARP in my page.
In my page, I have a button and when i click on it, new data will be generated for the webchart user control.
If i use the warp in a webForm page (without masterpage), the WARP wotks perfectly. But if i use the master page, the warp does not work.
Have you any idea?
Thank you in advance.
can you explain in more detail what you mean when you say it does not work?
I mean, the page do post back.
Here is my code.
*************master page********
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="MasterPage.master.cs" Inherits="WARP.MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head id="Head1" runat="server"> <title>Untitled Page</title> <asp:ContentPlaceHolder id="head" runat="server"> </asp:ContentPlaceHolder></head><body> <form id="form1" runat="server"> <div> <asp:Label ID="Label1" runat="server" Text="Master page"></asp:Label> <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </div> </form></body></html>
***************************************
***************usercontrol******************
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebUserControl2.ascx.cs" Inherits="WARP.WebUserControl2" %><%@ Register Assembly="Infragistics2.WebUI.UltraWebChart.v8.3, Version=8.3.20083.1009, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.WebUI.UltraWebChart" TagPrefix="igchart" %><%@ Register Assembly="Infragistics2.WebUI.UltraWebChart.v8.3, Version=8.3.20083.1009, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.UltraChart.Resources.Appearance" TagPrefix="igchartprop" %><%@ Register Assembly="Infragistics2.WebUI.UltraWebChart.v8.3, Version=8.3.20083.1009, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.UltraChart.Data" TagPrefix="igchartdata" %><igchart:ultrachart id="UltraChart1" runat="server" backgroundimagefilename="" bordercolor="Black" borderwidth="1px" emptycharttext="Data Not Available. Please call UltraChart.Data.DataBind() after setting valid Data.DataSource" version="8.3"><ColorModel ModelStyle="CustomLinear" ColorBegin="Pink" ColorEnd="DarkRed" AlphaLevel="150"></ColorModel>
<Effects><Effects><igchartprop:GradientEffect></igchartprop:GradientEffect></Effects></Effects>
<Axis><PE ElementType="None" Fill="Cornsilk"></PE>
<X Visible="True" LineThickness="1" TickmarkStyle="Smart" TickmarkInterval="0"><MajorGridLines Visible="True" DrawStyle="Dot" Color="Gainsboro" Thickness="1" AlphaLevel="255"></MajorGridLines>
<MinorGridLines Visible="False" DrawStyle="Dot" Color="LightGray" Thickness="1" AlphaLevel="255"></MinorGridLines>
<Labels ItemFormatString="<ITEM_LABEL>" Font="Verdana, 7pt" FontColor="DimGray" HorizontalAlign="Near" VerticalAlign="Center" Orientation="VerticalLeftFacing"><SeriesLabels Font="Verdana, 7pt" FontColor="DimGray" HorizontalAlign="Center" VerticalAlign="Center" Orientation="Horizontal"><Layout Behavior="Auto"></Layout></SeriesLabels>
<Layout Behavior="Auto"></Layout></Labels></X>
<Y Visible="True" LineThickness="1" TickmarkStyle="Smart" TickmarkInterval="50"><MajorGridLines Visible="True" DrawStyle="Dot" Color="Gainsboro" Thickness="1" AlphaLevel="255"></MajorGridLines>
<Labels ItemFormatString="<DATA_VALUE:00.##>" Font="Verdana, 7pt" FontColor="DimGray" HorizontalAlign="Far" VerticalAlign="Center" Orientation="Horizontal"><SeriesLabels Font="Verdana, 7pt" FontColor="DimGray" HorizontalAlign="Center" VerticalAlign="Center" Orientation="VerticalLeftFacing"><Layout Behavior="Auto"></Layout></SeriesLabels>
<Layout Behavior="Auto"></Layout></Labels></Y>
<Y2 Visible="False" LineThickness="1" TickmarkStyle="Smart" TickmarkInterval="50"><MajorGridLines Visible="True" DrawStyle="Dot" Color="Gainsboro" Thickness="1" AlphaLevel="255"></MajorGridLines>
<Labels ItemFormatString="<DATA_VALUE:00.##>" Font="Verdana, 7pt" FontColor="Gray" HorizontalAlign="Near" VerticalAlign="Center" Orientation="Horizontal"><SeriesLabels Font="Verdana, 7pt" FontColor="Gray" HorizontalAlign="Center" VerticalAlign="Center" Orientation="VerticalLeftFacing"><Layout Behavior="Auto"></Layout></SeriesLabels>
<Layout Behavior="Auto"></Layout></Labels></Y2>
<X2 Visible="False" LineThickness="1" TickmarkStyle="Smart" TickmarkInterval="0"><MajorGridLines Visible="True" DrawStyle="Dot" Color="Gainsboro" Thickness="1" AlphaLevel="255"></MajorGridLines>
<Labels ItemFormatString="<ITEM_LABEL>" Font="Verdana, 7pt" FontColor="Gray" HorizontalAlign="Far" VerticalAlign="Center" Orientation="VerticalLeftFacing"><SeriesLabels Font="Verdana, 7pt" FontColor="Gray" HorizontalAlign="Center" VerticalAlign="Center" Orientation="Horizontal"><Layout Behavior="Auto"></Layout></SeriesLabels>
<Layout Behavior="Auto"></Layout></Labels></X2>
<Z Visible="False" LineThickness="1" TickmarkStyle="Smart" TickmarkInterval="0"><MajorGridLines Visible="True" DrawStyle="Dot" Color="Gainsboro" Thickness="1" AlphaLevel="255"></MajorGridLines>
<Labels ItemFormatString="" Font="Verdana, 7pt" FontColor="DimGray" HorizontalAlign="Near" VerticalAlign="Center" Orientation="Horizontal"><SeriesLabels Font="Verdana, 7pt" FontColor="DimGray" HorizontalAlign="Center" VerticalAlign="Center" Orientation="Horizontal"><Layout Behavior="Auto"></Layout></SeriesLabels>
<Layout Behavior="Auto"></Layout></Labels></Z>
<Z2 Visible="False" LineThickness="1" TickmarkStyle="Smart" TickmarkInterval="0"><MajorGridLines Visible="True" DrawStyle="Dot" Color="Gainsboro" Thickness="1" AlphaLevel="255"></MajorGridLines>
<Labels ItemFormatString="" Font="Verdana, 7pt" FontColor="Gray" HorizontalAlign="Near" VerticalAlign="Center" Orientation="Horizontal"><SeriesLabels Font="Verdana, 7pt" FontColor="Gray" HorizontalAlign="Center" VerticalAlign="Center" Orientation="Horizontal"><Layout Behavior="Auto"></Layout></SeriesLabels>
<Layout Behavior="Auto"></Layout></Labels></Z2></Axis></igchart:ultrachart>
***********************************************
**********************page**************************
<%@ Page Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="WARP.WebForm2" Title="Untitled Page" %>
<%@ Register Src="WebUserControl2.ascx" TagName="WebUserControl2" TagPrefix="uc2" %>
<%@ Register Assembly="Infragistics2.WebUI.Misc.v8.3, Version=8.3.20083.1009, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.WebUI.Misc" TagPrefix="igmisc" %><%@ Register Src="WebUserControl1.ascx" TagName="WebUserControl1" TagPrefix="uc1" %><asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /> <igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel1" runat="server" Height="269px" Width="340px"> <uc2:WebUserControl2 ID="WebUserControl2_1" runat="server" /> </igmisc:WebAsyncRefreshPanel> <br /> <br /> </asp:Content>/////////////////////////////////////////////////////////////
********code behind******
protected void Button1_Click(object sender, EventArgs e) {
WebUserControl2_1.UltraChart1.DataSource = GetDatax(); WebUserControl2_1.UltraChart1.DataBind(); WebUserControl2_1.UltraChart1.Axis.Y.RangeMax = 6; WebUserControl2_1.UltraChart1.Axis.Y.RangeMin = 0; //WebUserControl2_1.UltraChart1.Axis.Y.RangeType = AxisRangeType.Custom; }
private static DataTable GetDatax() { DataTable table = new DataTable(); table.Columns.Add("Label Column", typeof(string)); table.Columns.Add("Sales", typeof(double)); table.Columns.Add("Presales", typeof(double)); table.Rows.Add(new object[] { "Point A", 1.0, 3.0 }); table.Rows.Add(new object[] { "Point B", 2.0, 2.0 }); table.Rows.Add(new object[] { "Point C", 3.0, 1.0 }); table.Rows.Add(new object[] { "Point D", 4.0, 2.0 }); table.Rows.Add(new object[] { "Point E", 5.0, 3.0 }); table.Rows.Add(new object[] { "Point F", 6.0, 4.0 }); return table; }
************************************************
******************************************************
I mean : The page display the webchart same as if the WARP is not used.
If i dont use a masterpage and i put the button inside the usercontrol, the the page will display in trasparent way the webchart. So the WARP works parfectly.
But im my application, i hav eto put the button outside the page and i have to bind the data to my webchart from outside the usercontrol (from my page when i click on the button).
I sent the complete code to you in my previous post. I hope that you can help to resolve my issue.
i got your sample running and i can see the problem now. seeing that it was the WARP and not the chart causing the problem, i searched the WARP forums for a possible answer.
so i noticed you have a thread going on there with Matt Traynor... http://forums.infragistics.com/forums/p/24250/88899.aspx#88899
i'm going to let him work through the issue with you since he is more experienced with the WARP than I am.
if you need any more help from me for any reason, just let me know.
thank you for your response.
I hope that i can receive soon an answare from him. I am still waiting since 2 weeks to resolve this problem.
Thank in advance for your help.