We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Setting Pointer Value from code behind

I'm trying to set the value of the pointer with a string from the code behind, I have the following:

<PointerCollection>
 <ej:Pointers NeedleType="Rectangle" Value="1300" Length="45" Width="1">
   <Border Color="#3AB54B"></Border>
 </ej:Pointers>
</PointerCollection>

In a normal situation I would do the following:

<ej:Pointers runat="server" ID="Point" NeedleType="Rectangle" Value="1300" Length="45" Width="1">

Then in the code behind:
 
Point.Value = 300;

However, when I do this I get the error:

Error Type 'Syncfusion.JavaScript.DataVisualization.Models.Pointers' does not have a public property named 'ID'.

Any help would be much appreciated! 




3 Replies

CW Cory Wynn December 11, 2015 01:49 PM UTC

I've managed to sort the problem above by using the ID from: 

<ej:circularGauge >

How would I set the End value from:

<ej:CircularRanges runat="server" StartValue="0" EndValue="249" Size="10" BackgroundColor="#3AB54B">

Using a string from the behind code?


DP Deepaa Pragaasam Syncfusion Team December 12, 2015 05:53 AM UTC

Hi Cory,
Thanks for contacting Syncfusion Support
We have analyzed your queries
Query 1: How to set the Pointers value in code behind
To set the Pointer Value, we can use the instance of the circular gauge as shown below
Code example:
[ASP.NET CS]


Query 2: How Would I set the end value from code behind
The end value in the circular range is of type double and it is set in the below way
Code Example:
[ASP.NET CS]

Screenshot:



We have attached the sample below for your reference
Sample Link: https://www.syncfusion.com/downloads/support/forum/121417/ze/Webapplication-1798515544
 
Please let us know if you have any concerns
Regards,
Deepaa


CW Cory Wynn December 14, 2015 04:21 PM UTC

Hi Deepaa,

Thanks for your help, I've got it working.

Kind regards,
Cory

Loader.
Live Chat Icon For mobile
Up arrow icon