Hey all.
I'm creating a page that is identical to this example:
https://docs.telerik.com/devtools/aspnet-ajax/controls/ajaxmanager/how-to/radajax-and-webusercontrols
In one of my user controls, I have a few controls/buttons that need to be AJAXified. I included a RadAjaxManagerProxy and stripped my example down to its most basic state, which can be seen below.
When a postback is caused, the event is seemingly bubbling up to the container page. In some cases, the entire control flickers. Additionally, I applied some JavaScript that adds text on my user control. When I click the AJAXified RadGrid, the text is gone. This leads me to believe the entire user control is being reloaded, though the ASP controls maintain their values.
<telerik:RadGrid runat="server" ID="rgOffers" Skin="Silk" AutoGenerateColumns="false" OnNeedDataSource="rgOffers_NeedDataSource" OnItemCommand="rgOffers_ItemCommand">
<ClientSettings Selecting-AllowRowSelect="true" EnablePostBackOnRowClick="true">
<ClientEvents OnRowSelected="onOfferSelected" />
</ClientSettings>
<MasterTableView>
<Columns>
...
</Columns>
</MasterTableView>
</telerik:RadGrid>
<asp:Panel runat="server" ID="pnlSelectedOffer" Visible="false">
Testing!
</asp:Panel>
<telerik:RadAjaxManagerProxy runat="server" ID="ramp">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="rgOffers">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="rgOffers" LoadingPanelID="ralp" />
<telerik:AjaxUpdatedControl ControlID="pnlSelectedOffer" LoadingPanelID="ralp" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManagerProxy>
<telerik:RadAjaxLoadingPanel runat="server" ID="ralp" Skin="Silk"></telerik:RadAjaxLoadingPanel>
protected void rgOffers_ItemCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName == "RowClick") {
pnlSelectedOffer.Visible = true;
RadAjaxManager.GetCurrent(Page).ResponseScripts.Add("alert("clicked.");");
}
}
I try to format my tooltip numbers to achieve the following results:
15327 -->15,327
1.034234 --> 1.034
1.02 --> 1.02
Unfortunately, whatever i do i am getting trailing zeroes, such as 1.020
I tried few ways, for example:
lineThird.TooltipsAppearance.ClientTemplate = "#=series.name# (" & IIf(strDollarsTons = "tons", "", "$") & "#= kendo.format(\'{0:N3}\', value)#" & IIf(strDollarsTons = "tons", " ktons", "M") & ")"
also,
"#= kendo.parseFloat(value)#"
"#= kendo.format(\'{0:#,###,###.###}\', value)#"
"#= kendo.format(\'{0:N}\', value)#"
Please help
My map has around 3000 shapes, i am trying to recenter it in javascript. Center and zoom take 5 sec each.
var map = $find("<%=RadMap1.ClientID%>").get_kendoWidget();
var latitude = 30;
var longitude = 5;
map.center([latitude, longitude]);
map.zoom(2.35);
just in case here is my map definition
<telerik:RadMap runat="server" ID="RadMap1" Height="640px"
UseSpringAnimations="False"
MaxZoom="5.5" MinZoom="2.1"
Zoomable="true">
<ClientEvents OnShapeCreated="shapeCreated" OnShapeMouseEnter="shapeMouseEnter"
OnShapeMouseLeave="shapeMouseLeave" OnShapeClick="shapeClick"
OnShapeFeatureCreated="onShapeFeatureCreated"
OnMarkerCreated="markerCreated" OnPan="OnPan"/>
<LayersCollection>
<telerik:MapLayer Type="Shape" ClientDataSourceID="dsBase" Opacity="0.9">
<StyleSettings>
<FillSettings Color="#1996E4"/>
<StrokeSettings Color="#FFFFFF" />
</StyleSettings>
</telerik:MapLayer>
<telerik:MapLayer Type="Shape" ClientDataSourceID="RadClientDataSource1" Opacity="0.9">
<StyleSettings>
<FillSettings Color="#1996E4"/>
<StrokeSettings Color="#FFFFFF" />
</StyleSettings>
</telerik:MapLayer>
<telerik:MapLayer Type="Shape" ClientDataSourceID="BubblesDataSource" Opacity="0.9">
<StyleSettings>
<FillSettings Color="#1996E4"/>
<StrokeSettings Color="#FFFFFF" />
</StyleSettings>
</telerik:MapLayer>
</LayersCollection>
</telerik:RadMap>
I have a RadGrid with an Edit Form Template. In the template, I have a couple RadNumericTextBoxes that I need to enable/disable depending on some checkboxes in the form.
In my javascript, when I do $find("<%= RadNumericTextBoxInGridEditFormTemplate.ClientId %>"), I get a compilation error when I visit the page that says RadNumericTextBoxInGridEditFormTemplate does not exist. This is understandable because it is not there yet.
I am working around this by doing
var
indirect = $(
".my-class"
); // Specified using CssClass="my-class" on RadNumericTextBoxInGridEditFormTemplate
var
textbox = $find(indirect.attr(
"id"
));
which works. I am just wondering if there's a better/more approved way to do this.
I have a Radgrid that has fields on every row. These fields allow users to type in numbers. The grid also allows the user to add more rows to the grid through the Add functionality of the grid.
I have a Save button on the button of my screen. When I click Save, I would like to loop through all the rows of the grid. Currently, in the Items collection there are only the rows in a Non-Insert state. I would like to loop through all of the rows that are in Insert mode along with all of the rows not in Insert mode.
I have attached an example of the grid in the double state. In this example I want to look through all 5 rows not just the 4 rows which are in my Items collection.
Hi,
I am using a RadComboBox with checkboxes set to "true' . This will enable a multi select option. When i select itmes in the combobox, sometimes it shows the number of items that iselected in the combobox and sometimes it does not show anything even after i selected items in the combobox.
Is there any proeprty to show the number of items that re selected in the checkboxes?
Thanks in Advance
<
telerik:RadSlider
runat
=
"server"
ID
=
"rsCommission"
Skin
=
"Silk"
AnimationDuration
=
"0"
></
telerik:RadSlider
>