This is a migrated thread and some comments may be shown as answers.

Bind SQL Data to Gauge.

1 Answer 117 Views
Gauge
This is a migrated thread and some comments may be shown as answers.
Rhishikesh Savadikar
Top achievements
Rank 1
Rhishikesh Savadikar asked on 10 Apr 2010, 05:50 AM
Hi,
I am creating a silverlight apps with C-sharp Code behind.

I have written an sql server 2005 query which returns me the maximum integer value of a column. How can I bind this data (a single int value) to the gauge. I browsed through the telerik site, but I didnt find any related examples.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 15 Apr 2010, 07:13 AM
Hi Rhishikesh Savadikar,

You have to pass value you've got from SQL server to the Value property of the gauge indicator. For example:

<control:RadGauge>
    <gauges:RadialGauge>
        <gauges:RadialScale Min="0"
                Max="100">
            <gauges:IndicatorList>
                <gauges:Needle Name="needle" />
            </gauges:IndicatorList>
        </gauges:RadialScale>
    </gauges:RadialGauge>
</control:RadGauge>

private void SetValueToGauge()
{
    // Read data from SQL server and put it to the variable of type double.
    // Then pass it to the indicator's value.
    double value = 25;
    this.needle.Value = value;
}


Regards,
Andrey Murzov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Gauge
Asked by
Rhishikesh Savadikar
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or