Hi,
We're developing software that allows users to create their own charts. Users specify the server connection, SQL queries and columns that will be used by the series. That means, the data where the charts will be bound are not strongly typed.
Grid allows for binding to a datatable (System.Data.Datatable). But charts doesn't seem so. Here's the code I used for Grid:
@model List<iGuideMobility.Web.Models.DataViewModel>
@(Html.Kendo().Grid(new System.Data.DataTable("DataSource1"))
.Name(Model.First().PanelUserID.ToString())
//.HtmlAttributes(new { style = "width:100%" })
.HtmlAttributes(new { style = "height: 350px" })
.Columns(column =>
{
var cols = Model.First().PanelColumn;
foreach (var col in cols)
{
column.Bound(col.strColumn.ToString()).Title(col.strCaption.ToString()).Width(Convert.ToInt32(col.intWidth.ToString()));
}
}
)
.DataSource(datasource => datasource
.Ajax()
.Batch(true)
.Read("PanelBinding_Read", "Home", new { intPanelID = Model.First().PanelID })
)
)
For Charts, it seems like we cannot implement the same logic of showing dynamic series bound to datasource that are created on runtime.
Can you point us to the right direction so we can accomplish this?
Thanks!
We're developing software that allows users to create their own charts. Users specify the server connection, SQL queries and columns that will be used by the series. That means, the data where the charts will be bound are not strongly typed.
Grid allows for binding to a datatable (System.Data.Datatable). But charts doesn't seem so. Here's the code I used for Grid:
@model List<iGuideMobility.Web.Models.DataViewModel>
@(Html.Kendo().Grid(new System.Data.DataTable("DataSource1"))
.Name(Model.First().PanelUserID.ToString())
//.HtmlAttributes(new { style = "width:100%" })
.HtmlAttributes(new { style = "height: 350px" })
.Columns(column =>
{
var cols = Model.First().PanelColumn;
foreach (var col in cols)
{
column.Bound(col.strColumn.ToString()).Title(col.strCaption.ToString()).Width(Convert.ToInt32(col.intWidth.ToString()));
}
}
)
.DataSource(datasource => datasource
.Ajax()
.Batch(true)
.Read("PanelBinding_Read", "Home", new { intPanelID = Model.First().PanelID })
)
)
For Charts, it seems like we cannot implement the same logic of showing dynamic series bound to datasource that are created on runtime.
Can you point us to the right direction so we can accomplish this?
Thanks!