Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
267 views
Hello,

I have a radmenu and one of the item templates uses radcombobox.

How do I make the radcombobox to show its dropdown over the menu ?
Roland
Top achievements
Rank 1
 answered on 21 Oct 2009
2 answers
171 views
Hello,

I have a treeview in a div. The div has fixed width and height. The treeview has fixed width and height smaller the div of course.

The node text is longer which gives me scroll bars (this is ok).

The attached screen shot shows selected node in IE8, IE8 standard mode. You can see the vertical scrollbar, then the div border and another div border.

Is there a way the text will not show over my divs on the right ?

Latest release of ASP.NET ajax controls.
Roland
Top achievements
Rank 1
 answered on 21 Oct 2009
1 answer
95 views
I was not sure which forum this is most appropriate in so I cross-posted this here and to the Calendar forum. 
We are implementing a Month/Year picker (http://www.telerik.com/community/code-library/aspnet-ajax/calendar/month-year-picker.aspx#944510) in the FilterTemplate of a RadGrid. I have copied the code from the grid below.  I have not been able to get the javascript to get a reference to the pickers ClientID - the compiler complains it does not know the TechManListPicker control.

Thanks

<telerik:GridDateTimeColumn HeaderText="Technical Manual Date" ReadOnly="true" DataField="TechnicalManualDate" DataFormatString="{0:MM/yyyy}">
                    <FilterTemplate>
                        <telerik:RadDatePicker ID="TechManListDatePicker" runat="server">
                            <DateInput DateFormat="MM/yyyy">
                            </DateInput>
                            <Calendar>
                                <FastNavigationSettings TodayButtonCaption="current date" />
                            </Calendar>
                        </telerik:RadDatePicker>
                        <telerik:RadScriptBlock ID="radScriptBlock" runat="server" >
                            <script type="text/javascript">
                                //override the onload event handler to change the picker after the page is loaded
                                //Sys.Application.add_load(setCalendarTable);

                                function setCalendarTable() {

                                    var picker = $find("<%= TechManListDatePicker.ClientID %>");
                                    var calendar = picker.get_calendar();
                                    var fastNavigation = calendar._getFastNavigation();

                                    $clearHandlers(picker.get_popupButton());
                                    picker.get_popupButton().href = "javascript:void(0);";
                                    $addHandler(picker.get_popupButton(), "click", function() {
                                        var textbox = picker.get_textBox();
                                        //adjust where to show the popup table
                                        var x, y;
                                        var adjustElement = textbox;
                                        if (textbox.style.display == "none")
                                            adjustElement = picker.get_popupImage();

                                        var pos = picker.getElementPosition(adjustElement);
                                        x = pos.x;
                                        y = pos.y + adjustElement.offsetHeight;

                                        var e = {
                                            clientX: x,
                                            clientY: y - document.documentElement.scrollTop
                                        };
                                        //synchronize the input date if set with the picker one
                                        var date = picker.get_selectedDate();
                                        if (date) {
                                            calendar.get_focusedDate()[0] = date.getFullYear();
                                            calendar.get_focusedDate()[1] = date.getMonth() + 1;
                                        }

                                        $get(calendar._titleID).onclick(e);

                                        return false;
                                    });

                                    fastNavigation.OnOK =
                                        function() {
                                            var date = new Date(fastNavigation.Year, fastNavigation.Month, 1);
                                            picker.get_dateInput().set_selectedDate(date);
                                            fastNavigation.Popup.Hide();
                                        }


                                    fastNavigation.OnToday =
                                        function() {
                                            var date = new Date();
                                            picker.get_dateInput().set_selectedDate(date);
                                            fastNavigation.Popup.Hide();
                                        }
                                }   
                            </script>
                        </telerik:RadScriptBlock>
                    </FilterTemplate>
                </telerik:GridDateTimeColumn>
Pavlina
Telerik team
 answered on 21 Oct 2009
1 answer
249 views
I created an Extension method that will set the page break of a RadTabStrip for visible tabs only and then split the rows in half.  I have a situation where some of the tabs will be visible during certain page views. 

so in your code for the page_load, you would just call:
RadTabStrip1.FormatMultiLineTabs(False); 

If you have any refactorings  or improvements for this snippet, I'd be interested to see it.
Enjoy!

C#:
using Telerik.Web.UI; 
using System.Runtime.ComplierServices;  
  
public class RadTabStripExtensions  
{  
  
    [Extension()]  
    public void FormatMultiLineTabs(ref RadTabStrip tab, bool ForceMultiLine)  
    {  
        int intTabCount = 0;  
        foreach (RadTab objTab in tab.Tabs) {  
            if (objTab.Visible)  
            {  
                intTabCount += 1;  
            }  
        }  
        if (ForceMultiLine || intTabCount >= 8) // this can be changed to the line break number  
        {  
            int intTabBreakIndex = intTabCount / 2 - 1;  
            if (intTabCount % 2 == 1)  
            {  
                intTabBreakIndex += 1;  
            }  
            tab.AddTabBreakToVisibleTabIndex(intTabBreakIndex);  
        }  
    }  
  
    [Extension()]  
    public void AddTabBreakToVisibleTabIndex(ref RadTabStrip tab, int VisibleIndexBreak)  
    {  
        int intIndex = 0;  
        foreach (RadTab objTab in tab.Tabs) {  
            if (objTab.Visible)  
            {  
                if (intIndex == VisibleIndexBreak)  
                {  
                    objTab.IsBreak = true;  
                }  
                intIndex += 1;  
            }  
        }  
    }  
  
}  

VB:
Imports Telerik.Web.UI 
Imports System.Runtime.CompilerServices  
  
Public Module RadTabStripExtensions  
  
    <Extension()> _  
    Public Sub FormatMultiLineTabs(ByRef tab As RadTabStrip, ByVal ForceMultiLine As Boolean)  
        Dim intTabCount As Integer = 0  
        For Each objTab As RadTab In tab.Tabs  
            If objTab.Visible Then  
                intTabCount += 1  
            End If  
        Next  
        If ForceMultiLine OrElse intTabCount >= 8 Then 'this can be changed to the line break number 
            Dim intTabBreakIndex As Integer = intTabCount \ 2 - 1  
            If intTabCount Mod 2 = 1 Then  
                intTabBreakIndex += 1  
            End If  
            tab.AddTabBreakToVisibleTabIndex(intTabBreakIndex)  
        End If  
    End Sub  
  
    <Extension()> _  
    Public Sub AddTabBreakToVisibleTabIndex(ByRef tab As RadTabStrip, ByVal VisibleIndexBreak As Integer)  
        Dim intIndex As Integer = 0  
        For Each objTab As RadTab In tab.Tabs  
            If objTab.Visible Then  
                If intIndex = VisibleIndexBreak Then  
                    objTab.IsBreak = True  
                End If  
                intIndex += 1  
            End If  
        Next  
    End Sub  
  
End Module  

Smitha Test
Top achievements
Rank 1
 answered on 21 Oct 2009
2 answers
139 views

I am having trouble with the EmptyMessage parameter being viewable in firefox.  This is what is happening:

I have a page that has a radtextbox as shown

<rad:RadTextBox ID="txtEmail" runat="server" MaxLength="200" EmptyMessage="E-mail address" EnableEmbeddedSkins="false" Skin="TEST" Width="200px" /> 

When I view the page in IE everything is good in that the empty message appears, and when I set focus to the textbox the message goes away and when the textbox loses focus the message comes back.  The problem I am seeing is when viewing this same page in firefox.  The page loads just fine with the empty message in the text box and it goes away when I set focus to the text box.  But when focus is lost in the text box without typing anything in, the empty message does not reappear.

I was looking at a demo on the telerik site:
http://demos.telerik.com/aspnet-ajax/input/examples/radtextbox/firstlook/defaultcs.aspx

and experienced the same thing.  I am running firefox 3.0 if that helps.

Do I need to add anything else to the radtextbox to get this to work in firefox too?

Thanks

Tom
Top achievements
Rank 1
 answered on 21 Oct 2009
1 answer
155 views
After the upgrade to radControls AJAX ASP.Net Q2 2009,  a RadSplitter I'd been using does not resize the adjacent panel when a sliding pane is expanded. Instead the pane expands but underneath the adjacent panel. I tried using the suggestion posted here but to no avail..

http://www.telerik.com/community/forums/aspnet/splitter/sliding-pane-problem.aspx


This problem seems to only happen with IE, firefox the behavior still works as expected. Aside from the above link, is there any other way to address this issue...?

The splitter has two panes, with a splitter bar in the middle of them. The left pane has sliding panes with menu items, when sliding out, they now go under the right pane (adjacent pane).

Thanks
Tsvetie
Telerik team
 answered on 21 Oct 2009
1 answer
282 views
Hi,

I'm struggling with developing a page which has dynamic TabStrip and MultiPage. When a button is clicked a new tab and pageView should be created and selected. The main challenge for me is to make it happen on client side so that the whole page does not refresh. A've already checked the LoadOnDemand demo, but my case is bit different, as I'm instanciating tabs and pageviews dynamicly.

What is the approach that you guys follow to resolve such a problem?

So far I managed to do the following:
1) when button clicked create a tab on client side and send an ajax request to server to create a tab item and pageview on the server side:
var tab = new Telerik.Web.UI.RadTab();  
tabStrip.get_tabs().add(tab);  
tab.set_text(menuName);  
tab.select();
 
var ajaxManager = $find('<%= RadAjaxManager1.ClientID %>');  
ajaxManager.ajaxRequest("ActivateTab," + menuName);  

2) In ajax handler:
RadTabtab = new RadTab();  
tab.Text = args[1];  
RadTabStrip1.Tabs.Add(tab);  
 
RadPageView pageView = new RadPageView();  
pageView.ID = args[1];  
rmp.PageViews.Add(pageView);  
tab.PageViewID = pageView.ID; 

3) Hooked up to tab selecting handlers:
<telerik:RadTabStrip .... OnClientTabSelecting="OnMainTabSelecting" OnTabClick="RadTabStrip1_TabClick" > 
canceling the postback if pageview is already attached to tab.
        function OnMainTabSelecting(sender, args) {  
            if (args.get_tab().get_pageViewID()) {  
                args.get_tab().set_postBack(false);  
            }  
        } 
TabClick server handler:
    protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e)  
    {  
    } 

4) Loading control for pageView
    protected void rmp_PageViewCreated(object sender, RadMultiPageEventArgs e)  
    {  
            string userControlName = getUserControl(e.PageView.ID);  
            Control userControl = Page.LoadControl(userControlName);  
            e.PageView.Controls.Add(userControl);  
    } 

This partially works. My main concern is that when creating a tab, it does not load the content of the pageView(I need to click on the tab load page content). Another minor issue is then I create tabs fast enough and select one of them, some of the previously created tabs disapper. Most probably the ajax request is being sent in the middle of receiveing previous postback, and some of tab creating requests are missed.

So, please help me to fix those issues. I need to make the page completely dynamic.

Thanks in advance,
Ruben.

P.S. I also tried to manipulate with PageViews in javascript, creating them on the client side and adding to multipage.get_pageViews() and multipage.get_pageViewData() arrays, and loading user control contents using WebMethods and HTTPContext.Current.Server.Execute(...) methods. It works for very simple usercontrols that have no ajaxmanagers. The ones that have some complicated controls are failing in Server.Execute methods. I'm open to any kind of solution.





Yana
Telerik team
 answered on 21 Oct 2009
2 answers
131 views
I have tried the example for starting spell check from javascript but it is not working for me.  The spell check windows opens and then immediately closes.  If I set buttonType="PushButton" and then click on the spell check button the spell check works as desired.

I used a good Telerik sample but cannot find the exact reference that I used but the link below is basically what I used
http://www.telerik.com/help/aspnet-ajax/spell_howtolaunching.html

Below is a non working sample.  I am using Telerik version 2009.2.826.35

Any help is greatly appreciated.

 

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="QuestionNote.aspx.vb" Inherits="QuestionNote" %> 
 
<%@ 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 id="Head1" runat="server">  
    <title>Question Note</title> 
</head> 
<body> 
 
    <script type="text/javascript">  
        function spellCheck()  
        {  
            var spell = $find("<%= RadSpell1.ClientID %>");  
            spell.startSpellCheck();  
        }  
 
        function checkFinished (sender, args)  
        {  
            args.suppressCompleteMessage = true;  
            alert('finished');  
        }  
    </script> 
 
    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> 
    <table width='100%' cellpadding='2'>  
        <tr> 
            <td> 
                <asp:TextBox ID="tbxNote" runat="server" Width="100%" Height="100" TextMode="MultiLine" Text='asdf' 
                    Rows="4"></asp:TextBox> 
                <br> 
            </td> 
        </tr> 
        <tr> 
            <td align='center'>  
                <input type="submit" name="Save" value="Save" class="ButtonNormal" onclick="return spellCheck()" /> 
                <asp:Button ID="btnCancel" runat="server" CssClass="ButtonNormal" Text="Cancel" /> 
            </td> 
        </tr> 
    </table> 
    <input id="control" type="hidden" name="control" runat="server">  
    <telerik:RadSpell ID="RadSpell1" runat="server" 
        ButtonType="None" ControlToCheck="tbxNote" OnClientCheckFinished="checkFinished" /> 
    </form> 
</body> 
</html> 
 

 

 

 

 

 

 

 

 

 

Joel R
Top achievements
Rank 1
 answered on 21 Oct 2009
1 answer
179 views
I am using VS 2008 and Rad AJAX Controls 2009.2.826.35. I put a RadEditor on the page and enabled dialgos and spell check. However I still get the error message that says dialogs are not enabled when trying insert a hyperlink or image or anything. The page loads and the editor works except for the dialogs. I have used the RadEditor many times before without issues, until now. Here is the handlers section of the web.config.

    <httpHandlers> 
      <remove verb="*" path="*.asmx" /> 
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" /> 
      <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" /> 
      <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" /> 
    </httpHandlers> 
 

What am I doing wrong here?

Thanks,
Tim

Rumen
Telerik team
 answered on 21 Oct 2009
1 answer
99 views
hi,
I have used auto complete control from ajax control toolkit to auto complete my text boxes' texts in a rad dock control,
but unfortunately when the control's list is opened it is behind the next rad dock. what can I do to see the auto complete list above the rad dock?
Pero
Telerik team
 answered on 21 Oct 2009
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?