Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
106 views

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.");");

    }

}

Tyler
Top achievements
Rank 1
 asked on 09 Nov 2017
0 answers
75 views
In my project currently I am using radlistbox with itemtemplate and table inside with text style changes and buttons.
I added javascript to table rows to expand and collapse.
Now I wanted to move this design to Radpanelbar as I ahve some issues with expandcollapse state changes. I am new to Radpanelbar and not sure how to use it. Weather to have have a structure <radpanelbar><items><radpanelitem><headertemplate><contenttemplate>
or
<radpanelbar><itemtemplate>
Can you please help me how to use it.
Below is the attached image(usedradlistbox) that I need to accomplish using radpanelbar.
Swetha
Top achievements
Rank 1
 asked on 09 Nov 2017
10 answers
175 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
161 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
108 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
761 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
66 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
471 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
71 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
163 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?