I want to display the gauge as one of the column in the RADgrid.
Instead of showing the performance in number, i want to display the guage.
And i want to get the value from datasource.
Is that possible...?
If yes, pls help me by giving the solution.
6 Answers, 1 is accepted
You can use the GridTemplateColumn of RadGrid, in order to integrate the RadGauge control with the RadGrid. Then you can use the RadGrid's OnItemDataBound event, in order to get the respective values from the datasource for the particular row of the RadGrid and assign them to the RadGauge. For example:
Note that the RadGauge is not a databound control, however, it can be created programmatically with the respective data from the RadGrid's datasource. You can also find useful Programmatic Creation help article related on how to create RadGauge programmatically, as well as Grid - Chart in GridTemplateColumn online demo, related on how to put a RadHtmlChart control inside RadGrid.
the Telerik team
I did as you said and it worked for me.
But I am using hierarchical grid. I am not able to expand the details table in the grid.
here is my code.
You can find the modified Grid - Declarative Relations online demo in the attached archive, showing how to set the pointer value of a RadGauge that is inside an hierarchical RadGrid. Said shortly:
- The RadGauge is put inside an ItemTemplate of a GridTemplateColumn in the second nested DetailTables.
- The name property of the GridTableView that holds the Gauge is set (i.e. Name="Orders") as well as the UniqueName property of the GridTemplateColum (i.e. UniqueName="GaugeColumn") so that the Gauge can be easily accessed.
- The field from the datasource that will be used for the Gauges' pointer values is included in the DataKeyNames property(i.e. DataKeyNames="OrderID, Quantity").
- Gauge's pointer values are set on ItemDataBound event.
You can also find useful this and this help articles.
the Telerik team
I have used RadLinearGauge control inside DetailTables of rad grid. but whenever DetailDatabind event is called RadLinearGauge's range was clear exclude clicked detailtable grid.
I have also attched my code here.
Can you please see and let me know what the issue with RadLinearGauge with Detail Table.
I have tried to reproduce the mentioned issue by modifying the VS example from my previous post, so that its logic approaches yours but to no avail. Could you please have a look at the provided video and then tell me what I am missing.
Could you also try to reproduce the issue with the attached VS example and then paste the changes you have made, so that I can proceed further with the investigation?