Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
78 views
Hi,
 
We are using radspell from Telerik controls(2010.1.415.35).
 
Here the issue is spellcheck is not working in IE 10.
Its working fine in all other browser(not sure about IE 9).But in IE 10 it is not even displaying.
But after a few clicks, the popup window shows up, but is blank.
 
Could you please help?
Marin Bratanov
Telerik team
 answered on 04 Apr 2013
1 answer
169 views
hi, 
when i do :
$find("<%= AddActiviteWindow.ClientID %>").getWindowBounds();
i get : 
Uncaught TypeError: Cannot read property 'style' of null Telerik.Web.UI.WebResource.axd:7068
a.RadWindow._getCurrentBounds Telerik.Web.UI.WebResource.axd:7068
a.RadWindow._getCalculatedPopupBounds Telerik.Web.UI.WebResource.axd:7097
a.RadWindow.getWindowBounds Telerik.Web.UI.WebResource.axd:6848
reSizeRadeditor
this is because in _getCurrentBounds you do : var c=(this._popupElement.style.display=="none")?true:false;
but you don't check if 
_popupElement exist. In my case because the radwindow is not display, _popupElement is null so i would suggest to add : if (!this._popupElement) return; before this._getCurrentBounds() in the function _getCalculatedPopupBounds

best regards Mathieu




Marin Bratanov
Telerik team
 answered on 04 Apr 2013
6 answers
1.9K+ views
Hi,
in the code behind (vbnet) i created this radtooltip and into tooltip i created this radbutton.

This is the code:

Private button As New RadButton()
 
            button.ID = "btnload"
            button.Text = "load photo"
            button.Skin = "Office2010Silver"
            button.Icon.PrimaryIconCssClass = "rbAdd"
            Dim tip As RadToolTip = New RadToolTip
            tip.ID = "RadTooltip1"
            tip.Controls.Add(button)
            RadAjaxPanel1.Controls.Add(tip)
            tip.TargetControlID = "Imgprofile"
            tip.Width = Unit.Pixel(120)
            tip.Height = Unit.Pixel(30)
            tip.RelativeTo = ToolTipRelativeDisplay.Element
            tip.Position = ToolTipPosition.MiddleRight
            tip.HideEvent = ToolTipHideEvent.ManualClose
            tip.Show()

now i wolud to create a event click of this button because into evento click must start this code:

Dim script As String = "function f(){$find(""" + RadWindowLoadprofile.ClientID + """).show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"
ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "key", script, True)

how can to create the click event?

bye
Danail Vasilev
Telerik team
 answered on 04 Apr 2013
6 answers
109 views
Contrary to what your demo says, the Paragraph Styles dropdown does not insert classes or inline styles that are defined

In this demo, http://demos.telerik.com/aspnet-ajax/editor/examples/formatblock/defaultcs.aspx, insert an 'H5 with an inline style' or an 'H6 with a class.' The H5 or H6 is inserted, but no style or class.

It makes this feature pretty redundant don't you think? Worthy of a demo? I think not.

Matt
shadow
Top achievements
Rank 2
 answered on 04 Apr 2013
5 answers
195 views
I would like to add a button to the toolbar in the file explorer. I saw the example in the documentation and was able to get it working. Now, I would like to change the image of the button (the default seems to be the refresh symbol). I noticed the imageurl property is blank so I decided to set it to an image in my library. The new button is now showing both the default refresh image, and the image I am trying to use.

I know I must be missing something here. Please help.

Thanks!
Tc Blaize
Top achievements
Rank 1
 answered on 04 Apr 2013
5 answers
257 views
If possible please suggest how to ensure a RadGrid in a Master Page has the correct calculated height. I have fixed height content in the Master Page but this content is not accounted for when the grid is sized. Please see the following basic example to explain further:

Master Page
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
    <style type="text/css">
        html, body, form
        {
            height:100%;
            margin: 0px;
            padding: 0px;
            overflow: hidden;   
        }
    </style>
    <asp:ContentPlaceHolder id="head" runat="server" />
</head>
<body>
    <div style="height:100px; background-color:blue;">Test Master Content</div>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" />
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server" />
    </form>
</body>
</html>

Child Page
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
 
</asp:Content>
 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%" Height="100%" Orientation="Horizontal">
        <telerik:RadPane ID="RadPane1" runat="server" Width="100%" height="50px" BackColor="Red">
            <p>This is a test</p>
        </telerik:RadPane>
        <telerik:RadSplitBar ID="RadSplitBar1" runat="server" />
        <telerik:RadPane ID="RadPane2" runat="server" Width="100%" Height="100%">
            <telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadGrid1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManagerProxy>
            <telerik:RadGrid ID="RadGrid1"
                runat="server"
                Width="100%"
                Height="100%"
                OnNeedDataSource="RadGrid1_NeedDataSource" />
    </telerik:RadPane>
    </telerik:RadSplitter>
</asp:Content>

Pavlina
Telerik team
 answered on 04 Apr 2013
0 answers
153 views
Hi,

I using a rad grid and the data binding is done on the client side. I'm having an issue with paging specifically page size change. Any time I increase the page size there's an issue. the grid columns doesnt display correctly, but when I decrease the page size everything appears to be fine. I've attached a couple images to show exactly what I'm dealing with. I'm up against a deadline and did not anticipate this issue so any help would be greatly appreciated.

Thanks,
Ron.
Ron
Top achievements
Rank 1
 asked on 04 Apr 2013
3 answers
279 views
Hi everyone

I have a problem with the grid on the third level.
has a scroll, but I can not make it maintain the position after the postback.
i added <Scrolling put AllowScroll="True" SaveScrollPosition="True"> but does not work.

in the following  image shows the scroll to which I refer.



Layo
Top achievements
Rank 1
 answered on 04 Apr 2013
1 answer
160 views
Hello community!

I've wrapped a RadButton and RadContextMenu into a server user control and am trying to find out if it is possible to integrate the usercontrol with a RadGrid so that when a RadMenuItem is clicked it can fire the RadGrid_OnItemCommand event just like clicking on a RadButton would do...

My goal is to catch the server side click event of the RadMenuItem and invoke the click event of the RadButton, thereby fooling the RadGrid into using the CommandName and CommandArgument passed along in a CommandEventArgs object.

This is how the control is added to the HTML markup:
<telerik:GridTemplateColumn HeaderText="Actions" HeaderStyle-Width="125px" ItemStyle-Width="125px">
    <ItemTemplate>
        <fmh:ActionButton runat="server" CommandArgument='<%# Eval("FieldId") %>' ID="abGridTest"
            OnMenuItemClicked="abGridTest_OnMenuItemClicked" >
            <ActionItems>
                <fmh:ActionItem Text="Example 1" Icon="save" CommandName="test1" />
                <fmh:ActionItem IsSeparator="true" />
                <fmh:ActionItem Text="Example 2" Icon="edit" CommandName="test2" />
            </ActionItems>
        </fmh:ActionButton>
    </ItemTemplate>
</telerik:GridTemplateColumn>

Here is a stripped down version of my user control that just does the basics:
public class ActionItem
{
    public ActionItem()
    {
        Visible = true;
    }
    public bool IsSeparator { get; set; }
    public bool Visible { get; set; }
    public string CommandName { get; set; }
    public string Icon { get; set; }
    public string Text { get; set; }
}
 
[ParseChildren(true)]
public sealed class ActionButton : DataBoundControl, INamingContainer
{
    [PersistenceMode(PersistenceMode.InnerProperty)]
    [TemplateContainer(typeof(ActionButton))]
    public ITemplate ContentTemplate { get; set; }
     
    [Bindable(true), DefaultValue("")]
    public string CommandArgument
    {
        get
        {
            object o = ViewState[ClientID + "_CommandArgument"];
            return o == null ? "0" : o.ToString();
        }
        set { ViewState[ClientID + "_CommandArgument"] = value; }
    }
 
    [MergableProperty(false), PersistenceMode(PersistenceMode.InnerProperty), DefaultValue((string)null)]
    public Collection<ActionItem> ActionItems { get; set; }
 
    public event CommandEventHandler MenuItemClicked;
    public RadContextMenu ContextMenu { get; set; }
    public RadButton Button { get; set; }
 
    protected override void CreateChildControls()
    {
        base.CreateChildControls();
 
        if (ContentTemplate != null)
            ContentTemplate.InstantiateIn(this);
 
        SetupButtonAndContextMenu();
        if (ActionItems != null)
        {
            foreach (ActionItem actionItem in ActionItems)
            {
                RadMenuItem rmi = new RadMenuItem();
 
                SetupMenuItem(actionItem, rmi);
 
                rmi.PostBack = true;
                rmi.Visible = actionItem.Visible;
 
                ContextMenu.Items.Add(rmi);
            }
        }
 
        Controls.Add(Button);
        Controls.Add(ContextMenu);
    }
 
    private void ContextMenuOnItemClick(object sender, RadMenuEventArgs radMenuEventArgs)
    {
        CommandEventArgs commandEventArgs = new CommandEventArgs(radMenuEventArgs.Item.Attributes["CommandName"], CommandArgument);
 
        // This is what I *thought* I would need to do, but this isn't working. Wrong binding flags?
        //typeof (RadButton).InvokeMember("Click", BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, Button,
        //new object[] {commandEventArgs});

       
// This works just fine...because I have a reference to the event already
        
MenuItemClicked.Invoke(this,
            new CommandEventArgs(radMenuEventArgs.Item.Attributes["CommandName"], CommandArgument));
    }
 
    private void SetupButtonAndContextMenu()
    {
        Button = new RadButton
        {
            ID = "Button",
            CssClass = "Secondary Utility",
            EnableSplitButton = true,
            Text = @"Action",
            AutoPostBack = false,
            OnClientClicked = "$F.ActionButton.onClientClicked",
            EnableEmbeddedSkins = false,
            Skin = "OurSkin",
            Width = Width
        };
 
        Button.Icon.SecondaryIconUrl = "/Common/Images/ButtonIcons/DropDownArrow.png";
 
        ContextMenu = new RadContextMenu
        {
            ID = "Button_Menu",
            ExpandDelay = 0,
            CollapseDelay = 0,
            EnableEmbeddedSkins = false,
            Skin = "OurSkin",
            OnClientItemClicked = "$F.ActionButton.onClientMenuItemClicked"
        };
        ContextMenu.ItemClick += ContextMenuOnItemClick;
 
    }
    private static void SetupMenuItem(ActionItem actionItem, RadMenuItem rmi)
    {
        if (actionItem.IsSeparator)
        {
            rmi.IsSeparator = true;
            return;
        }
 
        if (String.IsNullOrEmpty(actionItem.Text))
        {
            throw new ArgumentNullException("Text", @"ActionItem.Text is a required argument.");
        }
        rmi.Text = actionItem.Text;
        if (!String.IsNullOrEmpty(actionItem.Icon))
            rmi.ImageUrl = "/Common/Images/LinkButtonIcons/" + actionItem.Icon + ".png";
 
        rmi.Attributes["CommandName"] = !String.IsNullOrEmpty(actionItem.CommandName)
                                            ? actionItem.CommandName
                                            : actionItem.Text.RemoveSpaces();
    }
}

Hopefully someone will have an insight for me, or if nothing else you can use what I have so far to some benefit...

Thanks!
Thad

PS:  Here is the JavaScript.  I didn't clean it up so it has a bit of functionality you don't notice above.
$F.ActionButton = {
 
    onClientClicked: function (sender, eventArgs) {
        // Find the context menu and remove animations
        var contextMenu = window.$find(sender.get_id() + '_Menu');
 
        // Remove the animation so that it shows/hides immediately
        contextMenu._slide._collapseAnimation.set_type(window.Telerik.Web.UI.AnimationType.None);
        contextMenu._slide._expandAnimation.set_type(window.Telerik.Web.UI.AnimationType.None);
 
        // If it is already visible, just hide it.  For some reason the contextMenu.get_visible() returns false, hence the dom check.
        if (contextMenu.get_contextMenuElement().style.display == 'block') {
            contextMenu.hide();
            return;
        }
 
        // get the position of the Button that was clicked
        var currentLocation = window.$telerik.getBounds(sender.get_element());
         
        // Calculate position to show the context menu
        var contextMenuLeft = currentLocation.x;
        if (contextMenu.get_attributes().getAttribute('RTL') == 't') {
            var contextMenuWidth = $('#' + contextMenu.get_element().id + '_detached').width();
            if (contextMenuWidth == 0) {
                // reposition off screen so we can calculate the width.  Can't do that until it has been rendered once.
                contextMenu.showAt(-1000, -1000);
                contextMenuWidth = $('#' + contextMenu.get_element().id + '_detached').width();
            }
            contextMenuLeft = currentLocation.x + currentLocation.width - contextMenuWidth;
        }
        var contextMenuTop = currentLocation.y + currentLocation.height;
 
        // Show the context menu
        contextMenu.showAt(contextMenuLeft, contextMenuTop);
    },
 
    onClientMenuItemClicked: function (sender, eventArgs) {
        // Is there a function defined?
        var clientFunction = eventArgs.get_item().get_attributes().getAttribute("ClientFunction");
        if (!clientFunction || clientFunction.trim() == '') return;
 
        // Is this a real function?
        var fn = eval(clientFunction);
        if (!fn) return;
 
        // Build arguments to pass including command name and command argument
        var args = new Object;
        args.commandName = eventArgs.get_item().get_attributes().getAttribute("CommandName");
        args.commandArgument = eventArgs.get_item().get_attributes().getAttribute("CommandArgument");
 
        // Fire off the function passing arguments
        fn(sender, args);
    }

Danail Vasilev
Telerik team
 answered on 04 Apr 2013
12 answers
260 views

I have a web part that load user control with the RadScheduler and take a lot time to load the page. Does somebody has any idea why the page take too long?

I did everything in the following documents


Also, I change the Compilation debug to false and Scriptmanger to Scriptmode=release.

TIME
Get Data and RadScheduler.DataBind time : 700 - 800 Milliseconds

Time to load page
IE 10-11 secs. 

Chrome 5 secs

I have expended three days in do everything is in the web.
Regards
HANK

Boyan Dimitrov
Telerik team
 answered on 04 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?