Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
127 views
Hi,

I have a Sharepoint webpart that contains a Radgrid control. This control doesn't work properly in my webpart. I've installed ASP.NET AJAX, I've followed this link "http://www.telerik.com/community/forums/sharepoint-2010/integrate-ajax-controls/telerik-ajax-issue-with-sharepoint-2010.aspx" and Telerik documentation, and the grid doesn't work. When I click in a page number of the grid, nothing happens, but if I click again, all page is reload and the page changes. If I debug the Javascript code of Sharepoint page with Internet Explorer debug, there is an error in the last line of this function, to assing "innerHTML" property, although "updatePanelElement" object exists:

function Sys$WebForms$PageRequestManager$_updatePanel(updatePanelElement, rendering) {
        for (var updatePanelID in this._scriptDisposes) {
            if (this._elementContains(updatePanelElement, document.getElementById(updatePanelID))) {
                var disposeScripts = this._scriptDisposes[updatePanelID];
                for (var i = 0, l = disposeScripts.length; i < l; i++) {
                    eval(disposeScripts[i]);
                }
                delete this._scriptDisposes[updatePanelID];
            }
        }
        this._destroyTree(updatePanelElement);
        updatePanelElement.innerHTML = rendering;
    }

This is the code of my webpart main class:

private RadAjaxManager mAjaxManager;
 
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
 
            Page.ClientScript.RegisterStartupScript(typeof(myWebPart), this.ID, "_spOriginalFormAction = document.forms[0].action;_spSuppressFormOnSubmitWrapper=true;", true);
            if (this.Page.Form != null)
            {
                string formOnSubmitAtt = this.Page.Form.Attributes["onsubmit"];
                if (!string.IsNullOrEmpty(formOnSubmitAtt) && formOnSubmitAtt == "return _spFormOnSubmitWrapper();")
                {
                    this.Page.Form.Attributes["onsubmit"] = "_spFormOnSubmitWrapper();";
                }
            }
 
            ScriptManager scriptManager = ScriptManager.GetCurrent(Page);
            if (scriptManager == null)
            {
                scriptManager = new RadScriptManager();
                Page.Form.Controls.Add(scriptManager);
            }
 
            SetUpAjaxManagerOnPage();
 
            EnsureChildControls();
        }
 
 
        protected void SetUpAjaxManagerOnPage()
        {
            RadAjaxManager currentAjaxManager = RadAjaxManager.GetCurrent(Page);
 
            if (currentAjaxManager == null)
            {
                Page.Form.Controls.AddAt(0, AjaxManager);
                Page.Items.Add(typeof(RadAjaxManager), AjaxManager);
            }
        }
 
        protected virtual RadAjaxManager AjaxManager
        {
            get
            {
                if (mAjaxManager == null)
                {
                    mAjaxManager = RadAjaxManager.GetCurrent(Page);
 
                    if (mAjaxManager == null)
                    {
                        mAjaxManager = new RadAjaxManager() { ID = "RadAjaxManager1" };
                    }
                }
 
                return mAjaxManager;
            }
        }
 
        protected override void CreateChildControls()
        {
            Control control = Page.LoadControl(_ascxPath);
            Controls.Add(control);
        }

The code behind of the webpart, in the "Load" method is:

protected void Page_Load(object sender, EventArgs e)
        {
            RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);
            manager.EnableAJAX = true;
            manager.AjaxSettings.AddAjaxSetting(gvActuaciones, pnlGrid);
        }

In the ascx file, the RadGrid code is the following code:

<asp:Panel ID="pnlGrid" runat="server">
        <telerik:RadGrid ID="gvActuaciones" runat="server"
            OnNeedDataSource="gvActuaciones_NeedDataSource" AutoGenerateColumns="False"
            ShowStatusBar="True" AllowPaging="True" ShowFooter="True" PageSize="5">
            <ClientSettings>
                <Scrolling  AllowScroll="true" UseStaticHeaders="true"  SaveScrollPosition="true" ></Scrolling>
            </ClientSettings>
            <MasterTableView TableLayout="Fixed" >
                <Columns>
                    <telerik:GridTemplateColumn AllowFiltering="false" HeaderStyle-Width="60px" HeaderText="">
                        <ItemTemplate>
                            ...                    
                        </ItemTemplate>                                        
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn ...>
                   <telerik:GridBoundColumn ...>
                   ...
            </MasterTableView>
           </telerik:RadGrid>
</asp:Panel>

I don't know what can I do.
Thank you very much
Álvaro
Top achievements
Rank 1
 answered on 22 Jul 2013
1 answer
106 views
hi there,

i just want to ask what is the default behaviour of radcombobox for selecting items when "checkboxes=true"

is it user need to click exactly on the checkbox of each items or user can also just click the text of the item?

i ask this because based on this demo, we can select and deselect item by just clicking on the text but when i tried to implement that i need to click exactly on the checkbox to select and deselect the item..


regards,


nahwin
Shinu
Top achievements
Rank 2
 answered on 22 Jul 2013
1 answer
168 views
Hello,

I am looping through a datatable. For each row in the datatable, after executing set of commands, I want an alert message to be displayed and when the user clicks OK resume the loop. Is this possible?

        Dim dt As DataTable

        For i As Integer = 0 To dt.Rows.Count - 1

//Execute some code here

  RadAjaxManager1.Alert(newtid & " is assigned to Route " & rtNm)

//Resume the Code

        Next

Thanks

Jayesh Goyani
Top achievements
Rank 2
 answered on 22 Jul 2013
1 answer
275 views
Hi  All,
 
 I am creating 3 Radnumeric Textbox dynamically and i have to set the property TextMode as password , How can i implement this in RadNumeric Textbox without using any jscript.
If I use RadMaskedText box i dont have maxlength and cannot restrict the input value to integer.
If I use RadTextbox i cannot restrict the input value to integer and while setting the text box data in page load  the (bullet format is not visible) textbox will be empty . Please suggest me any approcah in the above scenario. I am not allowed to use Jscript or Jquery for keypress or keyup

Thanks,
Rakesh
Konstantin Dikov
Telerik team
 answered on 22 Jul 2013
1 answer
249 views
Hello,
Could you show me or point me to the direction to figure out how I can actually disable the "onclick" event on the disable menu item? Please look at this code segment. Even when the "ADD-PROFILE-LIST" menu item is disabled, when clicking on it, the "ShowEditForm" script still activates, which pop-ups a window.

Thanks in advance.

Tri
P.S: I don't have a way to attach the .zip file with all the code files.
<telerik:RadMenu ID="rmnSideBar" runat="server" Flow="Vertical" Skin="Default" EnableEmbeddedSkins="True"
    EnableSelection="false" Style="z-index: 3900;">
    <Items>
        <telerik:RadMenuItem runat="server" HoveredImageUrl="~/Images/Buttons/btn_Functions_glow.png"
            ImageUrl="~/Images/Buttons/btn_Functions.png" Width="26px">
            <Items>
                <telerik:RadMenuItem runat="server" ImageUrl="~/Images/24/report_add_24.png" Text="Add to Profile List"
                    Visible="true" onclick="return ShowEditForm('PopWin1', 0, 520, 370);" Enabled="false"
                    Value="ADD-PROFILE-LIST">
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadMenuItem>
    </Items>
</telerik:RadMenu>

Shinu
Top achievements
Rank 2
 answered on 22 Jul 2013
4 answers
202 views
Hello,

I am using telerik version 2012.1.515.35 with ASP.NET 3.5, C# 2008.

I have a RadTreeview on ASPX page in side a DIV.

The requirement is make RadTreeNode's width 100% of DIV width and also the node should be click-able (can be able to fire client side events).

I tried to set the width of node in NodeDataBound event but the result is nothing.

I also have tried to set width of class .rtIn to 100% but it is not changing the result.

Please see my attached screen-shot.

Any solution?

Thanks
Magdalena
Telerik team
 answered on 22 Jul 2013
1 answer
33 views
var slidingZone = $find("<%= SlidingZone1.ClientID %>");
                var panes = slidingZone.getPanes();
 
                var id = 0;
                var result = false;
                var paneID = panes[id]._clientStateFieldID;
 
                while (panes[id] != null) {
                    var isDocked = panes[id].get_docked();
                    if (isDocked) {
                        result = slidingZone.UndockPane(paneID);
                    }
                    id++;
                    if (panes[id] != null) {
                        paneID = panes[id]._clientStateFieldID;
                    }
                }
Vessy
Telerik team
 answered on 22 Jul 2013
1 answer
72 views
I'm having a new issue with RadEditor.  When I click on font name or font size, (using ToolbarMode="ShowOnFocus"
the dropdown menu is appearing in the top left corner.

Seems to be related to version: 2013.2.611.45

Anyone else having the same issue?

Rumen
Telerik team
 answered on 22 Jul 2013
1 answer
104 views
i'm implementing like this demo http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multiplecomboboxes/defaultcs.aspx
but when i copy the all code in demo the option on the last combobox is not saved when i click the explore option, it always goes to the frist option on that combo instead of the selected one, what am i missing?

i'm using q12013 sp1
Hristo Valyavicharski
Telerik team
 answered on 22 Jul 2013
4 answers
83 views
Hello Guys,

I am doing something like when you change the value of the RadNumericTextbox. it should changed the value of few other textboxes.
I am using clientsideevent "OnValuechange".
However i have server side code that should be called when i clicked row in grid that will change the value. On first time, it is calling both code i.e. Serverside and client side to chage the values.

How can i avoid to call ClientSide code on first time when i clicked on row?

Can i get any simple example?

Thanks,
Mayank
Maria Ilieva
Telerik team
 answered on 22 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?