View Full Version : [CLOSED] Error Creating control - chart modelfield

Jun 19, 2014, 2:40 PM
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, ext.net.utilities & Newtonsoft.json 6.0.3 (however, VS shows Newtonsoft.json with a version of 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">

<ext:Chart ID="Chart1" runat="server" Animate="true" Width="330" Height="300" Shadow="true" InsetPadding="30" Theme="Base:gradients">
<LegendConfig Position="Right" />
<asp:SqlDataSource ID="SQLDS1" runat="server" ConnectionString="<%$ ConnectionStrings:MSE_FIN %>" SelectCommand="PROC_LIST_PRJ_LARGEBUD_BYPI" SelectCommandType="StoredProcedure">
<asp:Parameter Name="PID" Type="Int32" DefaultValue="1016" />
<ext:Store ID="Store1" runat="server" DataSourceID="SQLDS1" AutoDataBind="True" >
<ext:Model ID="Model1" runat="server" >
<ext:ModelField Name="PROJNUM" />
<ext:ModelField Name="DBAL" />
<ext:PieSeries AngleField="DBAL" ShowInLegend="false" Donut="0" Highlight="true" HighlightSegmentMargin="20">
<Label Display="Rotate" Contrast="true" Font="12px Arial" Field="PROJNUM" />


Jun 19, 2014, 4:42 PM
Hi @megatechboy,

I removed the SqlDataSource and added this instead:

protected void Page_Load(object sender, EventArgs e)
if (!X.IsAjaxRequest)
this.Store1.DataSource = new object[]
DBAL = 100
and your control runs well for me. No error and the Chart appears.

Please post a screenshot of the Exception.

Ideally, please provide a runnable test case to reproduce. No depends on a database, please. It should not require it.

Jun 19, 2014, 5:05 PM
Thanks Daniil, attached is a screenshot. I tried it with your changes, and it run, a chart was displayed, but the error is still there, in the design view of VS editor.

I think it might be a problem with VS and the versions of references i have installed.

Jun 19, 2014, 8:52 PM
Here is a quote from

Currently Ext.NET provides only limited Visual Studion Design Time support.

I am afraid it is still actual.