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

I am trying to use your AJAX Editor control in combination with your Silverlight Ribbon & RADDock controls (see attached screenshot).  However Im struggling however to see how I would call commands in the (AJAX) Editor from the (Silverlight) Ribbon Bar.  For instance one of the things I want to do is have a button in my Ribbon which when clicked will disable/enabled the Editor(s) on my HTML page.

So far in my Ribbon bar button click I have the following C# code which will call a Javascript method on my HTML page which contains my Editor :

        private void DisabledEditor_Click(object sender, RoutedEventArgs e) 
        { 
            // Get the IFrame from the HtmlPresenter 
            HtmlElement iframe = (HtmlElement)App.Current.mainAEWindow.BrowseAndEdit.HtmlPresenter.Children[0]; 
 
            // Set an ID to the IFrame so that can be used later when calling the javascript 
            iframe.SetAttribute("id", "myIFrame"); 
 
            // Code to be executed 
            string code = "document.getElementById('myIFrame').contentWindow.SetEditorState();"
            HtmlPage.Window.Eval(code); 
        } 
 

This call gets to my HTML page fine, my issue is with the Javascript method and how I should use it to interact with my Editor :

    <script type="text/javascript"
    function SetEditorState() { 
        var editor = $find("<%=RadEditor1.ClientID%>"); //return a reference to RadEditor 
        editor.enabled = false; // this property does not exist ! 
    } 
    </script> 

As there isnt a client side "enabled" property on the Editor control I tried making an Asynchronous call from the Javascript to my C# code to disable the editor but as the calling code is not covered by one of the form controls listed in the <asp:AsyncPostBackTrigger> block in my <asp:UpdatePanel> (as in your online demo).  The call made it to my codebehind and changed the ".Enabled" property of my editor but the editor was not refreshed on screen :

        [System.Web.Services.WebMethod()]  
        [System.Web.Script.Services.ScriptMethod()]  
        public static void SetEditorState() 
        { 
            foreach (RadEditor re in editors) 
            { 
                re.Enabled = !re.Enabled; 
                if (re.Enabled) 
                    re.Style.Remove("overflow"); 
                else 
                    re.Style.Add("overflow", "auto"); 
            } 
        } 

Can you suggest some way of achieving this ?

Thanks in advance

Steve
Rumen
Telerik team
 answered on 20 Oct 2009
8 answers
1.1K+ views
Hi,

I have a problem in that I do not want the horizontal scroll bar to show (ever), think yahoo mail. However, whenever I increase a columns width the horizontal scroll bar appears. Can anyone help? Below is my code for the grid...

<telerik:RadGrid ID="RadGrid1" runat="server" OnItemDataBound="RadGrid_ItemDataBind" GridLines="None" Skin="Vista" AllowMultiRowSelection="True" 
            AllowPaging="false" AllowSorting="True" 
            PageSize="20" Height="100%" Width="100%" OnNeedDataSource="RadGrid1_NeedDataSource" > 
        <MasterTableView AutoGenerateColumns="False" Width="100%" DataKeyNames="ID" TableLayout="Fixed" RowIndicatorColumn-Resizable="true"
            <PagerStyle Visible="true" Mode="NextPrevAndNumeric" /> 
             
            <Columns> 
                <telerik:GridClientSelectColumn UniqueName="column"
                    <HeaderStyle Width="5%" /> 
                    <ItemStyle Width="5%" /> 
                </telerik:GridClientSelectColumn> 
                <telerik:GridTemplateColumn UniqueName="NameColumn" DataType="System.String" HeaderText="Name"
                    <HeaderStyle Width="15%" /> 
                    <ItemStyle Width="15%" Wrap="false" /> 
                    <ItemTemplate><asp:Label ID="lblName" runat="server"></asp:Label></ItemTemplate
                </telerik:GridTemplateColumn> 
                 
                <telerik:GridTemplateColumn UniqueName="ConstituencyColumn" DataType="System.String" HeaderText="Constituency"
                    <HeaderStyle Width="25%" /> 
                    <ItemStyle Width="25%" /> 
                    <ItemTemplate><asp:Label ID="lblConstituency" runat="server"></asp:Label></ItemTemplate
                </telerik:GridTemplateColumn> 
                <telerik:GridTemplateColumn UniqueName="PartyColumn" DataType="System.String" HeaderText="Party"
                    <HeaderStyle Width="10%" /> 
                    <ItemStyle Width="10%" /> 
                    <ItemTemplate><asp:Label ID="lblParty" runat="server"></asp:Label></ItemTemplate
                </telerik:GridTemplateColumn> 
                <telerik:GridTemplateColumn UniqueName="JobColumn" DataType="System.String" HeaderText="Job"
                    <HeaderStyle Width="20%" /> 
                    <ItemStyle Width="20%" /> 
                    <ItemTemplate><asp:Label ID="lblJob" runat="server"></asp:Label></ItemTemplate
                </telerik:GridTemplateColumn> 
                <telerik:GridTemplateColumn UniqueName="EmailColumn" DataType="System.String" HeaderText="Email"
                    <HeaderStyle Width="25%" /> 
                    <ItemStyle Width="25%" /> 
                    <ItemTemplate><asp:HyperLink ID="lblEmail" runat="server"></asp:HyperLink></ItemTemplate
                </telerik:GridTemplateColumn> 
            </Columns> 
        </MasterTableView> 
                    <ClientSettings AllowColumnsReorder="False"
                    <Resizing AllowColumnResize="true" EnableRealTimeResize="false" ResizeGridOnColumnResize="true" ClipCellContentOnResize="false" /> 
                    <Scrolling AllowScroll="True" UseStaticHeaders="True"/> 
                    <Selecting AllowRowSelect="True" /> 
                     
                </ClientSettings> 
        </telerik:RadGrid> 

Thanks in advance.

Antony
Jon
Top achievements
Rank 1
 answered on 20 Oct 2009
1 answer
123 views
Hi,

I have a horizontal splitter control with two panes, one on the top and the other at the bottom.  I also have a radcombobox located on the top pane of the splitter.  The problem is when the pane overflows and a scrollbar appears, when I use the mouse wheel of my mouse, the combobox moves along the scroll bar.  However, when I don't have a splitter control and I use my mouse wheel, this behavior doesn't appear.  I have below the markup of my page just to show the issue.

 <telerik:RadSplitter ID="SummarySplitter" runat="server"  
            Orientation="Horizontal" VisibleDuringInit="false" BorderStyle="Dotted"  
            Width="1016px" Height="205px"
        <telerik:RadPane ID="TopPane" runat="server" Scrolling="Both" Width="770px"  
                Height="69px" > 
            <div style="height: 194px"
                 <telerik:RadComboBox ID="RadIR" runat="server" NoWrap="True" > 
                                     
                    <Items> 
                        <telerik:RadComboBoxItem Text="1" /> 
                    </Items> 
                </telerik:RadComboBox> 
            </div> 
                
        </telerik:RadPane> 
        <telerik:RadSplitBar ID="HorizontalSplitBar" runat="server" CollapseMode="Forward" /> 
        <telerik:RadPane ID="BottomPane" runat="server" Scrolling="Both" Height="350px" Width="768px" > 
 
        </telerik:RadPane> 
    </telerik:RadSplitter>     

Thanks,
Ryan
Svetlina Anati
Telerik team
 answered on 20 Oct 2009
2 answers
178 views
Hello,

Adding Aggregate to some grid columns I discovered that in ItemDataBound the item.dataitem has been changed from DataRowView to this class dynamicClass1.

How could I use values from the associated Datarow now ?

Thanks
CS
CSurieux
Top achievements
Rank 2
 answered on 20 Oct 2009
1 answer
106 views
Hi I am trying to hook up an ajax event every time a checkbox is clicked inside of a dynamically populated radcombobox itemtemplate that contains a label and checkbox.  I get the ajax to work on the first checkbox that is clicked and it refreshes the grid using ajax but once you click a second item it causes a postback. What is the best way to accomplish this?

    Protected Sub chk1_CheckedChanged(ByVal sender As ObjectByVal e As EventArgs) 
        rgReceived.Rebind() 
    End Sub 
 
    Protected Sub rcbBehavior_ItemCreated(ByVal sender As ObjectByVal e As Telerik.Web.UI.RadComboBoxItemEventArgs) Handles rcbBehavior.ItemDataBound 
        Dim chkBox As CheckBox = e.Item.FindControl("chk1"
        RadAjaxManager1.AjaxSettings.AddAjaxSetting(chkBox, rgReceived, RadAjaxLoadingPanel1) 
    End Sub 

 
        <telerik:RadComboBox ID="rcbBehavior"  
    runat="server" AllowCustomText="true" ZIndex="3" 
                                 
    OnClientDropDownOpening="OnClientDropDownOpenedHandler" EmptyMessage="Select Behaviors..." 
                                HighlightTemplatedItems="true" Width="240px"
            <ItemTemplate> 
                <div> 
                    <asp:CheckBox ID="chk1" runat="server" Checked="true" AutoPostBack="true" onclick="onCheckBoxClick(this);" 
                                            OnCheckedChanged="chk1_CheckedChanged" /> 
                    <asp:Label ID="Label1" runat="server" AssociatedControlID="chk1"
                                <%#Eval("Title")%> 
                                        </asp:Label> 
                </div> 
            </ItemTemplate> 
        </telerik:RadComboBox> 


Yana
Telerik team
 answered on 20 Oct 2009
7 answers
280 views
Hi all,
I'm pretty terrible with css and it really drives me crazy. So I was wondering if anyone has adapted the Prometheus Outlook example to a fullscreen version?

I basically something performs almost identically to that example, but in fullscreen - ie, header along the top and the rest is functional area. I don't want the screen itself to have scrollbars when the content exceeds available real-estate... I want scrollbars in the individual panels.

Anyone successfully achieved this??

Cheers,
Daron
Dimo
Telerik team
 answered on 20 Oct 2009
2 answers
372 views
Hello,

I've got a problem with the viewstate object, when for example using a textbox within the xmlhttppanel.
I've read the following in the help documentation.

"Callback - When a client callback is used, the server Page does not go through its whole lifecycle, but only a small part of it. The client state is not updated, and it is not sent back to the client-side. When Callbacks are used, a POST request is made from the client to the server, and the values of all FORM fields, such as hidden fields (!including the view state field!) are sent to the server. When the view state is large, this could mean increased overhead. On the other hand, no extra files are needed to use this mode (unlike when using a WebService). "

However when the callback gets executed my pageload gets triggered, but I do not get the viewstate data.

What should I do to retrieve the data from the viewstate field?

kind regards,
Wim
Wim van der Linden
Top achievements
Rank 1
 answered on 20 Oct 2009
1 answer
87 views

Hello,
I posted a message in an existing thread but the thread is noticed as "Answered". I don't no if you check all threads or only the opened ones.

I try to personalize the point mark images of my Chart (server-side) but the modifications are not applied correctly (the default point mark icons are not replaced).
My code is based on a sample code that I found in another Thread:

protected void Page_Load(object sender, EventArgs e)       
{       
    RadChart2.BeforeLayout += new EventHandler<EventArgs>(RadChart2_BeforeLayout);       
}       
   
void RadChart2_BeforeLayout(object sender, EventArgs e)       
{       
    foreach (ChartSeriesItem item in RadChart2.Series[0].Items)       
    {       
        string imageUrl = "MyImage.jpg";       
   
        if(item.XValue > 5)       
            imageUrl = "MyImage2.jpg";       
   
        item.PointAppearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Image;       
        item.PointAppearance.FillStyle.FillSettings.BackgroundImage = imageUrl;       
    }       
}      

I try with different image format : PNG, JPG... but my point marks stay with the default images. I am sure that my URL is well-formed because I use it on other pages of my website without problems.

Thank you for your help.

Best regards,
Joël

Ves
Telerik team
 answered on 20 Oct 2009
0 answers
143 views
Hi,

        I have Telerik RadTabStrip control defined on UserControl. One of the tabs in RadTabStrip contains Ajax:ReorderList control. When i ran my application in IE 8, i was not able to reorder the items in ReorderList control. After searching for the issue in asp.net ajax forum, i got the solution to update my AjaxControlToolKit library to latest verion. Hence i updated my AjaxControlToolKit version to latest one (3.0.30930.28736) & now i am able to reorder the items in ReorderList control.

        Now the issue is, on updating AjaxControlToolKit to latest version, RadTabStrip does not work properly. On navigating between the tabs, it gives me html error of which the screen shot has been attached. This error occurs in both IE 7 & IE 8. All the tabs contain nothing except asp.net controls, ajax controls & telerik controls.

        Please help me with the solution ASAP as it is urgent fix required by the client.

Thanks,
Krishna Samaga B.
Krishna Samaga
Top achievements
Rank 1
 asked on 20 Oct 2009
1 answer
122 views
Hi,

I have a very strange problem with a nested splitter.
First I use a splitter to create a topPane and a contentPane.
Then the contentPane is split into a leftPane and rightPane.
The leftPane has a MinWidth of 300 and a MaxWidth of 800.
Scrolling of the parent pane is set to none.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SplitterTest.aspx.cs" Inherits="TestSite.SplitterTest" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server">  
    <title></title>  
    <style type="text/css">  
        html, body, form   
        {  
            height: 100%;  
            margin: 0;  
            padding: 0;  
            overflow: hidden;  
            font: normal 14px/1.5em "Segoe UI", Arial, sans-serif;  
        }  
    </style> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> 
        <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%" Height="100%" Orientation="Horizontal">  
            <telerik:RadPane ID="topPane" runat="server" Height="48px">  
                Header pane  
            </telerik:RadPane> 
            <telerik:RadSplitBar ID="RadSplitBar1" runat="server" EnableResize="false" /> 
            <telerik:RadPane ID="contentPane" runat="server" Scrolling="None">  
                <telerik:RadSplitter ID="RadSplitter2" runat="server">  
                    <telerik:RadPane ID="leftPane" runat="server" Scrolling="None" 
                        MinWidth="300" MaxWidth="800" Width="500">  
                        Left pane  
                    </telerik:RadPane> 
                    <telerik:RadSplitBar ID="RadSplitBar2" runat="server" /> 
                    <telerik:RadPane ID="rightPane" runat="server" Scrolling="None">  
                        Right pane<br /> 
                        1a 1b 1c 1d 1e 1f 1g 1h 1i 1j 1k 1l 1m 1n 1o 1p 1q 1r 1s 1t 1u 1v 1w 1x 1y 1z   
                        2a 2b 2c 2d 2e 2f 2g 2h 2i 2j 2k 2l 2m 2n 2o 2p 2q 2r 2s 2t 2u 2v 2w 2x 2y 2z   
                        3a 3b 3c 3d 3e 3f 3g 3h 3i 3j 3k 3l 3m 3n 3o 3p 3q 3r 3s 3t 3u 3v 3w 3x 3y 3z   
                        4a 4b 4c 4d 4e 4f 4g 4h 4i 4j 4k 4l 4m 4n 4o 4p 4q 4r 4s 4t 4u 4v 4w 4x 4y 4z   
                        5a 5b 5c 5d 5e 5f 5g 5h 5i 5j 5k 5l 5m 5n 5o 5p 5q 5r 5s 5t 5u 5v 5w 5x 5y 5z   
                        6a 6b 6c 6d 6e 6f 6g 6h 6i 6j 6k 6l 6m 6n 6o 6p 6q 6r 6s 6t 6u 6v 6w 6x 6y 6z   
                        7a 7b 7c 7d 7e 7f 7g 7h 7i 7j 7k 7l 7m 7n 7o 7p 7q 7r 7s 7t 7u 7v 7w 7x 7y 7z  
                        8a 8b 8c 8d 8e 8f 8g 8h 8i 8j 8k 8l 8m 8n 8o 8p 8q 8r 8s 8t 8u 8v 8w 8x 8y 8z  
                        9a 9b 9c 9d 9e 9f 9g 9h 9i 9j 9k 9l 9m 9n 9o 9p 9q 9r 9s 9t 9u 9v 9w 9x 9y 9z  
                    </telerik:RadPane> 
                </telerik:RadSplitter> 
            </telerik:RadPane> 
        </telerik:RadSplitter> 
    </form> 
</body> 
</html> 
 

The strange behavior happens when I set the Width for the leftPane to 500. The text of the rightPane will extent outside visible range (some items of the sequence in the rightPane are not visible).
If I remove the Width property, or make the Width equal to MinWidth (300) all text is visible.
We want the left pane to have a initial Width of 500. How can this be done?

Using version 2009.2.701.35

Thanks,
Mark
Tsvetie
Telerik team
 answered on 20 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?