Jun 19, 2014, 2:40 PM
[CLOSED] Error Creating control - chart modelfield
I've got a simple chart bound to a store which gets its data from stored procedure. This part works fine. Error shows in design view ' Error Creating Control - Panel1' --- compiled and running project shows no error on webpage.
Cannot create an object type of 'system.string[]' from its string representation 'PROJNUM' for the 'Field' property. -- PROJNUM field is a varchar field in db.
Using ext.net 2.5.5.10697, ext.net.utilities 2.4.0.0 & Newtonsoft.json 6.0.3 (however, VS shows Newtonsoft.json with a version of 6.0.0.0 in project properties references window -- it is pointing to the correct dll though).
Cannot create an object type of 'system.string[]' from its string representation 'PROJNUM' for the 'Field' property. -- PROJNUM field is a varchar field in db.
Using ext.net 2.5.5.10697, ext.net.utilities 2.4.0.0 & Newtonsoft.json 6.0.3 (however, VS shows Newtonsoft.json with a version of 6.0.0.0 in project properties references window -- it is pointing to the correct dll though).
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="facCharts.ascx.vb" Inherits="MSEFUSION.facCharts" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<ext:Panel ID="Panel1" runat="server" Height="300" Title="Title">
<Items>
<ext:Chart ID="Chart1" runat="server" Animate="true" Width="330" Height="300" Shadow="true" InsetPadding="30" Theme="Base:gradients">
<LegendConfig Position="Right" />
<HtmlBin>
<asp:SqlDataSource ID="SQLDS1" runat="server" ConnectionString="<%$ ConnectionStrings:MSE_FIN %>" SelectCommand="PROC_LIST_PRJ_LARGEBUD_BYPI" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter Name="PID" Type="Int32" DefaultValue="1016" />
</SelectParameters>
</asp:SqlDataSource>
</HtmlBin>
<Store>
<ext:Store ID="Store1" runat="server" DataSourceID="SQLDS1" AutoDataBind="True" >
<Model>
<ext:Model ID="Model1" runat="server" >
<Fields>
<ext:ModelField Name="PROJNUM" />
<ext:ModelField Name="DBAL" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<Series>
<ext:PieSeries AngleField="DBAL" ShowInLegend="false" Donut="0" Highlight="true" HighlightSegmentMargin="20">
<Label Display="Rotate" Contrast="true" Font="12px Arial" Field="PROJNUM" />
</ext:PieSeries>
</Series>
</ext:Chart>
</Items>
</ext:Panel>
Last edited by Daniil; Jun 24, 2014 at 2:13 PM.
Reason: [CLOSED]