Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
111 views
i test the example of InsertSpecialLink it is work fine exept when i select a normal text and a link i have this error js :

Message : Erreur d'exĂ©cution inconnue
Ligne : 147
Caractère : 14
Code : 0
URI : http://soliserv02/chart_test_export/editor2.aspx

 

how i fix that?

my code where ia have the error :

<script type="text/javascript">  
        //<![CDATA[  
        Telerik.Web.UI.Editor.CommandList["InsertSpecialLink"] = function(commandName, editor, args) {  
            var elem = editor.getSelectedElement(); //returns the selected element.  
 
            if (elem.tagName == "A") {  
                editor.selectElement(elem);  
                argument = elem;  
 
            }  
            else {  
 
                var content = editor.getSelectionHtml();  
 
                var link = editor.get_document().createElement("A");  
 
                // the error of selection
                link.innerHTML = content;  
          
                argument = link;  
       
            }  
        
            var myCallbackFunction = function(sender, args) {  
                editor.pasteHtml(String.format("<a href={0} target='{1}' class='{2}'>{3}</a> ", args.href, args.target, args.className, args.name))  
            }  
 
            editor.showExternalDialog(  
            'InsertLink.aspx',  
            argument,  
            270,  
            300,  
            myCallbackFunction,  
            null,  
            'Insert Link',  
            true,  
            Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,  
            false,  
            true);  
        };  
 
 
          
        //]]>  
    </script> 
Dobromir
Telerik team
 answered on 12 Feb 2010
1 answer
86 views

On the radEditor content there is only a vertical scrollbar appearing. Not a horizontal one.
I use internet explorer in design mode.

Could you help me?

Regards,
Eleni
Rumen
Telerik team
 answered on 12 Feb 2010
4 answers
265 views
How to add tooltip for the expand/collapse  button of RadTreeView?
I want to add tooltip text  "Expand" and "Collapse" in the expand/collapse  button of RadTreeView?

Thanks in advance


kavitha
Top achievements
Rank 1
 answered on 12 Feb 2010
2 answers
321 views
Hi,

I want to thank you all for your quick and helpful answers to questions. I hope that I am not posting something that has already been posted, but I have given a thorough look.

I have a specific need of an old-school marquee. You know, scrolls one line of text from right to left, continuously. I would like to pass it a string that I construct in the code-behind. This works fine for the <marquee> html element, but that is not smooth at all.

I came back to telerik because I've been around the internet and consulting other resources for many days, even weeks, and you guys are the ones that seem to help me best, though I don't know if you have any resources for my specific question. I have tried dynamic drive's marquee (smoother but freaks out and won't render at random times), many javascript resources (I can't seem to get any javascript examples to work for me... no idea why) and I don't know how flash interacts with asp.

I see you have a ticker and a rotator... could those be used in the way I need? I haven't been able to get them to render, probably because I haven't passed them data sources. Could I get them to emulate the marquee, and would it be smooth?

Thank you so much, I hope you can grant me some rest from my silly, yet difficult to solve problem.

Nicole
Fiko
Telerik team
 answered on 12 Feb 2010
2 answers
105 views
Hi all,

Can I have a dropdown having all the skins i.e, vista,Outlook,Telerik,Forest...  when I will select any one of the skin from the dropdown then all the controls of that page should be changed to the selected skin as you applied in the Demos for Telerik controls.Is it possible if so how any help would be helpful.
robertw102
Top achievements
Rank 1
 answered on 12 Feb 2010
1 answer
144 views
Hi,

I have a problem with RadRotator in IE7. Rotator is placed inside a table cell and the table (width:800px;height:450px) position is defined, so that it stays always in the middle of viewport using text-align:center and vertical-align:middle. When user resize the window then the rotator does not move (is not placed inside the table cell anymore) like it should and it falls out of its boundaries. See enclosed images. This works fine in IE8 and FF3. Can you tell me what I am doing wrong / is there any workaround for this behaviour?

<asp:Content ID="cntNews" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">  
 
<table style="height:100%; width:100%" cellpadding="0" cellspacing="0" border="0">  
    <tr> 
        <td style="background-image:url('Images/news2.png'); background-repeat:no-repeat; height:100%">  
            <table cellpadding="0" cellspacing="0" border="0" style="height:100%; width:100%">  
                <tr> 
                    <td style="height:80%">  
                        <table cellpadding="0" cellspacing="0" border="1" style="width:100%; height:100%">  
                            <tr> 
                                <td> 
                                &nbsp;  
                                </td> 
                                <td style="height:300px; width:250px; text-align:left; vertical-align:top;">  
                                    <telerik:RadRotator ID="rrNews" runat="server" DataSourceID="sdsNews"   
                                                        Height="300px" ItemHeight="300" Width="250px" ItemWidth="250"   
                                                        ScrollDirection="Right" RotatorType="FromCode">  
                                        <ItemTemplate> 
                                            <div style="position:relative; top:0px; left:0px;">  
                                                <%# DataBinder.Eval(Container.DataItem, "Text")%> 
                                            </div> 
                                        </ItemTemplate>    
                                    </telerik:RadRotator> 
                                </td> 
                            </tr> 
                        </table> 
                    </td> 
                </tr> 
                <tr> 
                    <td class="MenuBarContainer">  
                        &nbsp  
                    </td> 
                </tr> 
                <tr> 
                    <td style="height:15%">  
                        &nbsp;  
                    </td> 
                </tr> 
            </table> 
        </td> 
    </tr> 
</table> 
</asp:Content> 

Regards,
Pete
Fiko
Telerik team
 answered on 12 Feb 2010
1 answer
120 views
Hi..
         I am getting the following error while i am trying to export the grid data into PDF..I have the grid which is having nested grid also inside of it.

System.NullReferenceException: Object reference not set to an instance of an object.
  at Telerik.Web.Apoc.Render.Pdf.Fonts.Type2CIDSubsetFont.get_WArray()
  at Telerik.Web.Apoc.Pdf.PdfFontCreator.CreateCIDFont(String pdfFontID, Font font, CIDFont cidFont)
  at Telerik.Web.Apoc.Pdf.PdfFontCreator.MakeFont(String pdfFontID, Font font)
  at Telerik.Web.Apoc.Pdf.FontSetup.AddToResources(PdfFontCreator fontCreator, PdfResources resources)
  at Telerik.Web.Apoc.Render.Pdf.PdfRenderer.StopRenderer()
  at Telerik.Web.Apoc.StreamRenderer.StopRenderer()
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.SystemException: System.NullReferenceException: Object reference not set to an instance of an object.
  at Telerik.Web.Apoc.Render.Pdf.Fonts.Type2CIDSubsetFont.get_WArray()
  at Telerik.Web.Apoc.Pdf.PdfFontCreator.CreateCIDFont(String pdfFontID, Font font, CIDFont cidFont)
  at Telerik.Web.Apoc.Pdf.PdfFontCreator.MakeFont(String pdfFontID, Font font)
  at Telerik.Web.Apoc.Pdf.FontSetup.AddToResources(PdfFontCreator fontCreator, PdfResources resources)
  at Telerik.Web.Apoc.Render.Pdf.PdfRenderer.StopRenderer()
  at Telerik.Web.Apoc.StreamRenderer.StopRenderer()
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SystemException: System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Web.Apoc.Render.Pdf.Fonts.Type2CIDSubsetFont.get_WArray()
   at Telerik.Web.Apoc.Pdf.PdfFontCreator.CreateCIDFont(String pdfFontID, Font font, CIDFont cidFont)
   at Telerik.Web.Apoc.Pdf.PdfFontCreator.MakeFont(String pdfFontID, Font font)
   at Telerik.Web.Apoc.Pdf.FontSetup.AddToResources(PdfFontCreator fontCreator, PdfResources resources)
   at Telerik.Web.Apoc.Render.Pdf.PdfRenderer.StopRenderer()
   at Telerik.Web.Apoc.StreamRenderer.StopRenderer()
   at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)]
   Telerik.Web.Apoc.ApocDriver.FireApocError(String message) +122
   Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader) +951
   Telerik.Web.Apoc.ApocDriver.Render(XmlReader inputReader, Stream outputStream) +293
   Telerik.Web.Apoc.ApocDriver.Render(TextReader inputReader, Stream outputStream) +61
   Telerik.Web.UI.Grid.Export.TableViewExporter.PdfExportRenderForm(HtmlTextWriter nullWriter, Control form) +2018
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +8673113
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +51
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
   Telerik.Web.UI.Grid.Export.TableViewExporter.PdfExportRenderPage(HtmlTextWriter nullWriter, Control page) +161
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +825
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266


I am unable to find the bug.So looking forward to hear from you.


Daniel
Telerik team
 answered on 12 Feb 2010
1 answer
127 views
I have a drop down menu that displays an "arrow" section to scroll down to items that would normally render at the bottom of the page. I don't want this scrolling effect to be used at all, if the menu is too long and goes past the page length I want it to just display past the page. How do I disable this function?
Veronica
Telerik team
 answered on 12 Feb 2010
5 answers
444 views
Hello,

we have changed the Grid behaviour to support a "Single Group Expand/Collapse" mechanism. The property "GroupsDefaultExpanded" is set to false on the MasterTableView. Paging is set to false by default, the PageSize is set to 15 by default.
The DataSource contains 150 items, which are configured to build 5 groups.

When a group is expanded, the ItemCommand event handler is called, which collapses all group headers and expands the currently selected. AllowPaging is set to true and then "Rebind()" is called.

Consider the following scenario:
1.) The page is initially called.
2.) The DataSource is added in the NeedDataSource event.
3.) The Grid is build with 5 groups, no paging enabled, all is fine.

4.) The third group expand button is clicked.
5.) The ItemCommand event handler gets called and processes the steps as defined above.
6.) The NeedDataSource event handler gets called and retrieved the Items based on the selected group header. (This data is transfered from the ItemCommand event handler). The DataSource contains now 34 entries. 4 just to build the groups, and 30 detail entries for the group to expand.
7.) The ItemCreated and ItemDataBound event handler gets called.


Result:
The page now displays 3 Groups, the second with an expanded image button, but no items in the group. The paging bar contains figures for the three pages. Now I click on the second page, back to the first page.
After that, the first page is displayed as expected: The first and second Groups are collapsed, the third is openned and displays the items.


When now another group (say the second) is openned, the same happens: The first group is initial collapsed, the second expanded, but no items in it. After using paging, the page looks like expected.

Could you please help me to determine the issue, why group items are displayed only after a paging event? Is there some call missing?

Following is some Code from the ItemCommand event handler:
if (e.CommandName == RadGrid.ExpandCollapseCommandName) 
            { 
                GridGroupHeaderItem groupHeaderItem = (GridGroupHeaderItem) e.Item; 
                 
                GridItem[] groupHeaderItems = grid.MasterTableView.GetItems(GridItemType.GroupHeader);  
                // collapse all group header items currently on the page to support a "single open group" effect  
                foreach (GridGroupHeaderItem grpHeaderItem in groupHeaderItems) 
                { 
                    grpHeaderItem.Expanded = false;  
                } 
 
                // When "Expand" is clicked, the expanded state is set to false. Therefore, the division from this group header  
                // needs to be read. When "Collapse" is clicked, the state is assigned "true"  
                if (!groupHeaderItem.Expanded) 
                { 
                    string currentDivision = this.GetDivisionFromGroupHeader(groupHeaderItem); 
                    new ObjectLifecycleHelper(this.Page, this.ViewState).SetCurrentSelectedGridDivision(currentDivision); 
                     
                    groupHeaderItem.Expanded = true
                } 
 
                if (!grid.AllowPaging) 
                { 
                    grid.AllowPaging = true
                    grid.PageSize = 15;  
                } 
                // rebind in each case, because otherwise the Expanded/Collapsed state is not changed by the view  
                grid.Rebind(); 



Thanks for your support!

Sincereley,
Johann
Radoslav
Telerik team
 answered on 12 Feb 2010
1 answer
84 views
I am using a vertical menu, it is using the Sitefinity skin and the center in a div CSS from this post: http://www.telerik.com/community/forums/aspnet-ajax/menu/centering-menu-in-a-div.aspx

How can I also get the menu item separator to be 100% width?
Yana
Telerik team
 answered on 12 Feb 2010
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?