Telerik Forums
UI for ASP.NET AJAX Forum
10 answers
244 views

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

David
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 09 Nov 2017
7 answers
212 views

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>

Rumen
Telerik team
 answered on 09 Nov 2017
1 answer
145 views

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.

 

Marin Bratanov
Telerik team
 answered on 09 Nov 2017
3 answers
901 views

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.

Eyup
Telerik team
 answered on 09 Nov 2017
0 answers
100 views
I have a TreeView with checkboxes, that I'm using with multiple parent and children nodes. I wanted to add the intermediate state (the black box that shows in the parent checkbox when not all the children nodes are checked), so I added the tri-state to the TreeView. Problem is, the tri-state checks the parent node if all children nodes are checked. This behavior is unacceptable in my case and I don't want it to happen. I simply want the parent node to be in an intermediate state if not all children nodes are checked, and to be unchecked other than that, unless the user checks it. Is there any way that this behavior can be achieved? Note that if there is any way besides the tri-state, like overriding the "normal" TreeView to have such a behavior, is welcomed. Please give me a little example - like a demo - of the code if there is any. Thank you in advance
Wassim
Top achievements
Rank 1
 asked on 09 Nov 2017
4 answers
558 views

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

Charanjot
Top achievements
Rank 1
 answered on 09 Nov 2017
1 answer
112 views
I'm using a very basic <telerik:RadSlider> implementation, however the display is off and I can't figure out why. The slider is in a .ascx User Control that's loaded into a PageView dynamically, almost identical to  this example.

<telerik:RadSlider runat="server" ID="rsCommission" Skin="Silk" AnimationDuration="0"></telerik:RadSlider>     

Tyler
Top achievements
Rank 1
 answered on 08 Nov 2017
2 answers
222 views
Hi,
How do I add tooltip for the "Move Up", "Move Down" and "Delete" buttons on a RadListBox?
lakshan
Top achievements
Rank 1
 answered on 08 Nov 2017
0 answers
209 views

I have tried the following codes but nothing hides the radtab on indexchange

RadTabStrip1.Tabs[1].Visible = false;
                        RadTabStrip1.Tabs[1].Width = 0;
                        RadTabStrip1.Tabs[1].Height = 0;
                        RadTabStrip1.Tabs[1].Attributes.Add("style", "display: none;");

Sam
Top achievements
Rank 1
 asked on 08 Nov 2017
3 answers
842 views
I have a template column in a grid as follows trying to populate all the sources and set the focus on particular source...
but i was able to get only the focused value...and combo-box is not populating...how to achieve all the values and set focus on particular value

<
telerik:GridTemplateColumn HeaderText="Source" DataField="SourceName">
                        <ItemTemplate>
                            <%# DataBinder.Eval(Container.DataItem, "SourceName")%>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadComboBox ID="rdcmbSource1" runat="server" Height="200px" Width="190px"
                                DataTextField="SourceName" DataValueField="SourceID" DataSource="<%# GetActivemarketingSources() %>"
                                SelectedValue='<%# Eval("SourceID").ToString() %>'>
                            </telerik:RadComboBox>
                        </EditItemTemplate>
</telerik:GridTemplateColumn>

public static object GetActivemarketingSources()
       {
           using (EnabledDataContext db = new EnabledDataContext())
           {
               var getsources = (from sources in db.Sources
                                 where sources.StoreID.Equals(535) && !sources.Deleted
                                 orderby sources.SourceID
                                 select new
                                 {
                                     SourceID = sources.SourceID.ToString(),
                                     SourceName = sources.SourceName.ToString()
                                 }).ToList();
               getsources.Insert(0, new { SourceID = "", SourceName = "" });
               getsources.Insert(1, new { SourceID = "", SourceName = "Selected by user" });
               return getsources;
           }
       }
  Thanks...!!
Lira
Top achievements
Rank 1
 answered on 08 Nov 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?