Hi
Is it possible to add an ultraSparkline chart to an ultraGrid row in code? and if so do you have an example of how to do it?
Cheers
Dave
Hello David,
Thank you for contacting. In order to put any control in the grid column you would have to use UltraControlContainerEditor and set its RenderingControl and RenderingControlPropertyName properties.
And then Assign the UltraControlContainerEditor to the grid column.
Something like that :
UltraControlContainerEditor ultraControlContainerEditor = new UltraControlContainerEditor(); ultraControlContainerEditor.RenderingControl = this.ultraSparkline1; ultraControlContainerEditor.RenderingControlPropertyName = "DataSource"; // Assign the UltraControlContainerEditor to the grid column. sparklineColumn.EditorComponent = ultraControlContainerEditor;
Also attached a small demo sample for the reference.
Sparkline in a grid.zip
Hi Divya
Thank you for the very prompt reply. This works great apart from when I resize the row the sparkline doesn't resize unlike in your example when it does. Is there a setting on the grid that controls this behaviour as I have all other properties the same as your example.