Hello Friends,
I am developing a web page in which i want to display on a popup on linkbutton click.
I want to display chart dynamically in ModalPopup .but i am unable to display it
directly on linkbutton click.
When i click on the link button , the buttonclick event should get fired and
on button click event the the function is called to get the datafor chart.
Once that data is recieved I create the chart dynamically and then call the
modalpopup.show() but no contents are visible on the chart .How can i solve this ?
Please suggest...
please see the below code..
<asp:UpdatePanel ID="UpdatePanel1" runat="server" >
<contenttemplate>
<asp:Panel ID="pnlPopup" runat="server" Width="550px">
<table>
<tr>
<td class="popupheading" align="right">
<input ID="btnCancel" type="button" value="Cancel" /></td>
</tr>
<tr>
<td>
<asp:chart ID="Chart1" runat="server" backcolor="#F3DFC1"
BackGradientStyle="TopBottom" BorderColor="181, 64, 1" BorderDashStyle="Solid"
BorderWidth="2" Height="351px"
ImageLocation="~\TempImages\ChartPic_#SEQ(300,3)" imagetype="Png"
Palette="BrightPastel" Width="500px">
<titles>
<asp:title Alignment="TopLeft" Font="Trebuchet MS, 14.25pt, style=Bold"
ForeColor="26, 59, 105" ShadowColor="32, 0, 0, 0" ShadowOffset="3" >
</titles>
<legends>
<asp:legend BackColor="Transparent"
Font="Trebuchet MS, 8pt, style=Bold" Name="Default" AutoFitMinFontSize="9"
BackImageAlignment="Top" BackImageTransparentColor="255, 128, 128"
BorderColor="192, 64, 0" BorderDashStyle="NotSet"
InterlacedRowsColor="255, 128, 128" BackImageWrapMode="Unscaled"
Enabled="False">
</legends>
<borderskin skinstyle="Emboss" />
<series>
<asp:series BorderColor="180, 26, 59, 105" ChartArea="ChartArea1"
Color="224, 64, 10" Name="Series1" IsValueShownAsLabel="True"
Label="#VALY % " LabelToolTip="#VAL" ToolTip="#VAL"
CustomProperties="MinPixelPointWidth=30, DrawingStyle=Cylinder, LabelStyle=Top, MaxPixelPointWidth=30, DrawSideBySide=False">
</series>
<chartareas>
<asp:chartarea BackColor="OldLace" BackGradientStyle="TopBottom"
BackSecondaryColor="White" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid"
Name="ChartArea1" ShadowColor="Transparent">
<area3dstyle Inclination="15" IsClustered="False" IsRightAngleAxes="False"
perspective="10" Rotation="10" wallwidth="0" />
<axisy linecolor="64, 64, 64, 64" islabelautofit="False">
<labelstyle font="Trebuchet MS, 8.25pt, style=Bold" />
<majorgrid linecolor="64, 64, 64, 64" />
<majortickmark interval="Auto" intervaltype="Auto" intervaloffset="Auto" intervaloffsettype="Auto" />
</axisy>
<axisx linecolor="64, 64, 64, 64" labelautofitmaxfontsize="12">
TitleAlignment="Near">
<labelstyle font="Trebuchet MS, 8.25pt, style=Bold" IsStaggered="True" />
<majorgrid linecolor="64, 64, 64, 64" />
<scaleview sizetype="Months" />
</axisx>
</chartareas>
</td>
</tr>
</table>
<div>
<asp:Button ID="btnOkay" Text="Done" runat="server" onclick="btnOkay_Click" />
</div>
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False"
onclick="LinkButton1_Click" OnClientClick="GetChartData">Click here
<cc1:ModalPopupExtender ID="modalpopup" runat="server"
BackgroundCssClass="modal" CancelControlID="btnCancel" DynamicServicePath=""
Enabled="True" OkControlID="Button1" PopupControlID="pnlPopup"
TargetControlID="LinkButton1" DynamicServiceMethod="GetDynamicContent">
<br />
</contenttemplate>
Regards,
Kishor.