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

Handle event in radial gauge

1 Answer 106 Views
Gauge
This is a migrated thread and some comments may be shown as answers.
Tomer
Top achievements
Rank 1
Tomer asked on 26 Dec 2012, 09:12 AM
Hi,

I want to add click event on the gauge that will transfer the value to an function and than I will use this data.

Is there a option to handle events on the radial/linear gauge?

10x.

1 Answer, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 26 Dec 2012, 11:08 AM
Hello Tomer,

You can add an onclick handler for the div wrapper of the chart so you can get a reference to the control through the control field the DOM object exposes. Then you can use its client-side API to get the value. For example:
<telerik:RadRadialGauge runat="server" ID="rrg1" onclick="getMyValue(this);">
    <Pointer Value="22">
    </Pointer>
</telerik:RadRadialGauge>
<script type="text/javascript">
    function getMyValue(element)
    {
        alert(element.control.get_value());
    }
</script>



Greetings,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Gauge
Asked by
Tomer
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or