<dx:BootstrapSparkline runat="server" ArgumentField="Argument" ValueField="Value">
</dx:BootstrapSparkline>
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Sparkline_DataBinding : System.Web.UI.Page {
protected void Page_Load(object sender, EventArgs e) {
BindToObjectSparkline.DataSource = GetDataTable();
}
private DataTable GetDataTable() {
DataTable dataTable = new DataTable();
dataTable.Columns.Add("Argument", typeof(string));
dataTable.Columns.Add("Value", typeof(int));
dataTable.Rows.Add(new object[] { "1", 3 });
dataTable.Rows.Add(new object[] { "2", 2 });
dataTable.Rows.Add(new object[] { "3", 5 });
dataTable.Rows.Add(new object[] { "4", 9 });
dataTable.Rows.Add(new object[] { "5", 1 });
return dataTable;
}
}