Hi Team,
We need a help related to "RadNumericTextBox" as we are using it with "AM Charts", we want to manage the charts and set resolution to a fixed number or set it to auto, so that it should get managed as per size of table and chart, the Telerik details we are using, Telerik version 2014.3.1024.45 with Asp.Net Webforms, Kindy request you to please give a solution.
Thank you
Hi Swapnil,
Telerik UI for ASP.NET AJAX does not offer out-of-the-box support for third-party libraries such as AM Charts. Having in mind that we are not familiar with AM Charts, what you can do is the experiment with the following information:
<telerik:RadNumericTextBox ID="resolutionTextBox" runat="server" Width="150px"></telerik:RadNumericTextBox>
<asp:Button ID="applyButton" runat="server" Text="Apply" OnClick="ApplyButton_Click" />
protected void ApplyButton_Click(object sender, EventArgs e) { int resolution = (int)resolutionTextBox.Value; Chart1.Width = Unit.Pixel(resolution); Chart1.Height = Unit.Pixel(resolution); Chart1.DataSource = GetChartData(); //implement this function which should return the chart data Chart1.DataBind(); }
The code sets the width and height of the chart to the value entered in the RadNumericTextBox control, and then sets the chart's data source and binds the data to the chart.
Note that the above code is just an example and may need to be adapted to your specific use case and as per AM Charts API and docs/support guidance.
Additionally, the Telerik UI for ASP.NET AJAX version you are using is very old and vulnerable to some critical vulnerabilities. It is highly recommended to upgrade to at least 2020.1.114 or even better the latest one to take advantage of security bug fixes and new features. You can find more information at https://docs.telerik.com/devtools/aspnet-ajax/knowledge-base/common-allows-javascriptserializer-deserialization.