Hi,
I am trying to a create a grid with many bound columns and I also need an additional column that displays UltraChart.
Is there a sample to demonstrate how to implement this?
Hello,
You can accomplish this by setting the Image of the chart as the ImageBackground of the grid's cell. This avoids some of the overhead of having the UltraChart control render. You can set this in the InitializeRow event like the below snippet:
private void ultraGrid1_InitializeRow(object sender, InitializeRowEventArgs e) { if (e.Row.Cells.Exists("Data")) { List<double> data = e.Row.GetCellValue("Data") as List<double>; UltraChart chart = new UltraChart(); chart.Data.ZeroAligned = true; chart.Name = "chart"; chart.Height = 200; chart.Width = 300; chart.DataSource = data; chart.DataBind(); e.Row.Cells["Activity"].Appearance.ImageBackground = chart.Image; } }
I have also attached a sample that demonstrates this. If you need any further assistance with this, please let me know and I will be glad to help.
6574.WindowsFormsApplication1.zip