Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
57 views
Hi,
  I'm not able to start_edit() a new node at the 2nd Level client-side if the parent node does not have any child previously and this is the only child.

Below is the code I've written to add a new node.

                function AddNode(parentNode)
                {
                    var tree = parentNode.get_treeView();
                    tree.trackChanges();
                    var node = new Telerik.Web.UI.RadTreeNode();
                    node.set_text("New Node");
                    node.set_value("New Node");
                    parentNode.get_nodes().add(node);
                    node.select();
                    tree.add_nodeEdited(NodeAdded);
                    tree.commitChanges();
                    node.startEdit();
                }


at the node.startEdit() statement it throws an error as: "htmlfile: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus."


Please note that the ExpandMode of the Nodes are "WebService"

-Himanshu

Himanshu
Top achievements
Rank 1
 answered on 27 Apr 2011
2 answers
82 views

Hello !

i would like to do the same think the is working:

 

 

 

 

<asp:Label CssClass="edInline" ID="LblActif" Width="115px" runat="server"><%= DatabaseResourceManager.Translate("5031/Actif")%></asp:Label>

 

 

 

 

i m calling a c# class to translate my text with the database text corresponding in the good language and it works good, i would like to do the same with columns in the aspx file not in code behind but this doesn't seems to work :

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="LastName" FilterControlAltText="Filter column column"
  
HeaderText='<%= DatabaseResourceManager.Translate("5914/:Nom")%>' UniqueName="LastName">
  
</telerik:GridBoundColumn>

 

some help ?

[EDIT]
Ok I found a way to solve it (the night is good to think :-) )

<telerik:GridTemplateColumn>
     <HeaderTemplate>
           <asp:Label ID="clLblLastName" runat="server"><%= DatabaseResourceManager.Translate("5914/Nom") %></asp:Label
      </HeaderTemplate>
      <ItemTemplate>
            <asp:Label runat="server" ID="clTxtLastName" Text='<%# Eval("LastName") %>'></asp:Label>
       </ItemTemplate>
</telerik:GridTemplateColumn>
guillaume monore
Top achievements
Rank 1
 answered on 27 Apr 2011
1 answer
82 views
The Ribbonbar is a great control. One small UI request... I don't think there should be a line underneath selected tabs as can be seen in the attached screen capture
Simon
Telerik team
 answered on 27 Apr 2011
1 answer
82 views
I am using 2011 Q1 of ASP.NET Ajax tools. I have the following code within a RadListView control for data paging.

<table cellpadding="0" cellspacing="0" width="100%;" style="clear: both;">
    <tr>
        <td>
            <telerik:RadDataPager ID="RadDataPager2" runat="server" PagedControlID="RadListView1"
                PageSize="10">
                <Fields>
                    <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                    <telerik:RadDataPagerButtonField FieldType="Numeric" />
                    <telerik:RadDataPagerButtonField FieldType="NextLast" />
                    <telerik:RadDataPagerPageSizeField PageSizeText="Page size: " />
                    <telerik:RadDataPagerGoToPageField CurrentPageText="Page: " TotalPageText="of" SubmitButtonText="Go"
                        TextBoxWidth="15" />
                    <telerik:RadDataPagerTemplatePageField>
                        <PagerTemplate>
                            <div style="float: right">
                                <b>Items
                                    <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex+1%>" />
                                    to
                                    <asp:Label runat="server" ID="TotalPagesLabel" Text="<%# Container.Owner.TotalRowCount > (Container.Owner.StartRowIndex+Container.Owner.PageSize) ? Container.Owner.StartRowIndex+Container.Owner.PageSize : Container.Owner.TotalRowCount %>" />
                                    of
                                    <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>" />
                                    <br />
                                </b>
                            </div>
                        </PagerTemplate>
                    </telerik:RadDataPagerTemplatePageField>
                </Fields>
            </telerik:RadDataPager>
        </td>
    </tr>
</table>

The layout works fine in Internet Explorer (9) and Firefox (4) (see datapager ie.png image) but the page x of x section wraps in Chrome (10) and Safari (5) (see datapager chrome.png).

Any ideas on how to fix this?

Thank you.
Galin
Telerik team
 answered on 27 Apr 2011
7 answers
106 views
In the event DayRender on certain days of the month I add a CSS class on the cell.

If e.Day.Date >= startDate AndAlso e.Day.Date <= endDate Then
    e.Cell.Attributes.Add("class", "singleItem")
End If

The default text color is orange.

The CSS class contains only the line "color: # ff0000"

When I put my cursor on the figure is red "# ff0000", my figure back to the color orange. How can he not remove my css class that I added in my event DayRender?
Maria Ilieva
Telerik team
 answered on 27 Apr 2011
1 answer
138 views
Hi,

We are using radgrid(RadGrid.Net2, Version=5.0.1.0) and we are exporting data to excel using radGrid.MasterTableView.ExportToExcel();
As grid contains date columns, we want to format it in given format. But grid does not support "ExcelExportCellFormatting" event.
Can anybody provide me the solution or any workaround.

Reg,
Chirag
Daniel
Telerik team
 answered on 27 Apr 2011
1 answer
146 views

Hi,

 

We using Telerik tools (Version Version=2009.3.1208.20) for our ASP.Net web development. We also have Radgrids with sorting and Pagination functionality enabled in our ASPX pages. From the 508 testing, we noticed the following issues with the Radgrid when pagination/sorting enabled.  

 

a)      When images are removed or certain alternate stylesheets are applied, the table pagination and sort image buttons disappear. (Please find the attachment TotalExceptionsTableWithCSSDisabled.PNG)

b)      When CSS is disabled on the page, the table pagination and sort image buttons display as buttons with no text (they display as a gray box).  (Please find the attachment ExceptionRequestCSSOff.PNG)

c)       Further more, the “Page Size” combo box at the end (at the footer) of the radgrid data table do not have explicit labeling. Is there a way we could add a explicit label to the page size drop down?

 

We have also identified few other section 508 issues with Radgrid and created separate service requests for them. Per response to those threads, we are grouping all 508 relates issues in this one single thread.  Please find the list of 508 issues attached.

 

d)      http://www.telerik.com/community/forums/aspnet-ajax/grid/508-no-audible-cue-that-a-sort-has-been-performed-on-collumn-sort-in-radgrid.aspx

e)      http://www.telerik.com/community/forums/aspnet-ajax/grid/508-radgrid-pagination-use-layout-table-but-have-summary-attribute.aspx

f)       http://www.telerik.com/community/forums/aspnet-ajax/grid/508-no-audible-cue-that-a-sort-has-been-performed-on-collumn-sort-in-radgrid.aspx#1558157

g)      http://www.telerik.com/community/forums/aspnet-ajax/grid/508-radgrid-pagination-use-layout-table-but-have-summary-attribute.aspx#1558178

h)      http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-complex-nested-table-how-to-code-table-using-headers-and-id-attributes.aspx#1558242

 

Please provide me a guidance / option how to address these section 508 findings.

 

Thanks,

Kalidas.K

Iana Tsolova
Telerik team
 answered on 27 Apr 2011
1 answer
255 views
Hi,
I am experiencing problem with RadSplitter by setting height to 100%
To demonstrate the issue, I created  a simple project - but I can not include a zip file here!

Some times the height is ok, but generally after pressing F5 (refresh), it takes a wrong size. In my production project i getting wrong size always.
I analyzed html and find that when splitter have a wrong size, it has the following inlize css style: 
<div id="ctl00_MainSplitter" style="width: 1210px; height: 400px;" control="[object Object]">

I tried to use all kinds of tricks, but it not working for me, can somebody help me with this issue?

Here Master Page Code: 
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="TreePartMaster.Master.cs" Inherits="Intel.Diamond.Web.TreePartMaster" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head id="masterHead" runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=8" />
    <title>Diamond System</title>
    <link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
    <telerik:RadStyleSheetManager ID="masterRadStyleSheetManager" runat="server" CdnSettings-TelerikCdn="Auto" ClientIDMode="Inherit" />
    <script type="text/javascript">
        function OnBodyStart() {
            //Calculate Width and Height
            var myWidth = 0, myHeight = 0;
            if (typeof (window.innerWidth) == 'number') {
                //Non-IE
                myWidth = window.innerWidth;
                myHeight = window.innerHeight;
            } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
                //IE 6+ in 'standards compliant mode'
                myWidth = document.documentElement.clientWidth;
                myHeight = document.documentElement.clientHeight;
            } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
                //IE 4 compatible
                myWidth = document.body.clientWidth;
                myHeight = document.body.clientHeight;
            }
 
            //Update style vars with new width and height
            var b, p, m;
 
            b = parseInt(myHeight * 0.95) + "px";
            p = parseInt(myHeight * 0.97) + "px";
            m = parseInt(myHeight * 0.87) + "px";
 
            changecss(".body", "height", b);
            changecss(".page", "height", p);
            changecss(".main", "height", m);
 
            //            var ScreenWidth = document.forms[0].item("_ScreenWidth");
            //            var ScreenHeight = document.forms[0].item("_ScreenHeight");
            //           
            //            ScreenWidth.value = document.documentElement.clientWidth
            //            ScreenHeight.value = document.documentElement.clientHeight;
        };
 
        function changecss(theClass, element, value) {
            var cssRules;
 
            var added = false;
            for (var S = 0; S < document.styleSheets.length; S++) {
                if (document.styleSheets[S]['rules']) {
                    cssRules = 'rules';
                } else if (document.styleSheets[S]['cssRules']) {
                    cssRules = 'cssRules';
                } else {
                    //no rules found... browser unknown
                }
 
                for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) {
                    if (document.styleSheets[S][cssRules][R].selectorText == theClass) {
                        if (document.styleSheets[S][cssRules][R].style[element]) {
                            document.styleSheets[S][cssRules][R].style[element] = value;
                            added = true;
                            break;
                        }
                    }
                }
                if (!added) {
                    try {
                        document.styleSheets[S].insertRule(theClass + ' { ' + element + ': ' + value + '; }', document.styleSheets[S][cssRules].length);
 
                    } catch (err) {
                        try { document.styleSheets[S].addRule(theClass, element + ': ' + value + ';'); } catch (err) {
                        }
 
                    }
                }
            }
        };
    </script>
    <asp:ContentPlaceHolder ID="HeadContent" runat="server">
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <style type="text/css">
                                                
                .RadPaneLocationFix
                {
                    position: relative;
                }
            </style>
            <style type="text/css">
 
                html, body, form
                {
                    height: 100%;
                    margin: 0px;
                    padding: 0px;
                    overflow: hidden;
                }
          
                #updatePnl
                {
                    height: 100% !important;
                }
            </style>
        </telerik:RadCodeBlock>
    </asp:ContentPlaceHolder>
</head>
<body class="body" onload="OnBodyStart();">
    <form id="masterForm" runat="server">
    <telerik:RadScriptManager ID="masterRadScriptManager" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <telerik:RadFormDecorator runat="server" ID="LabFormDecorator" DecoratedControls="All"
        Skin="WebBlue" />
    <telerik:RadAjaxManager ID="masterRadAjaxManager" runat="server" DefaultLoadingPanelID="AjaxDefaultLoadingPanel">
    </telerik:RadAjaxManager>
    <div class="page">
        <div class="header">
            <div class="title">
                <table id="tbHeaderLayout">
                    <tr>
                        <td style="vertical-align: top;">
                            <asp:Image ID="DiamondLogo" runat="server" ImageUrl="~/Images/DmSystemLogo.gif" Height="40px"
                                BorderStyle="None" />
                        </td>
                        <td style="vertical-align: top;">
                            <label style="color: White; font-size: 30px">
                                ThThe Diamond System
                            </label>
                        </td>
                </table>
            </div>
            <div class="loginDisplay">               
            </div>
        </div>
        <div class="main">
        <asp:UpdatePanel runat="server" ID="updatePnl" style="height:100%;">
         <ContentTemplate>
            <telerik:RadSplitter ID="MainSplitter" runat="server" Width="100%"
                Height="100%" BackColor="#66CCFF">
                <telerik:RadPane ID="SideSplitterPane" runat="server" Width="15%">
                    <telerik:RadSlidingZone ID="MainSlidingZone" runat="server" DockedPaneId="SideBarSlidingPane"
                        Width="22px">
                        <telerik:RadSlidingPane ID="SideBarSlidingPane" runat="server" Title="Side Menu">
                            <telerik:RadPanelBar ID="SideBarMenu" runat="server" Width="100%" Height="100%">
                                <Items>
                                    <telerik:RadPanelItem runat="server" NavigateUrl="~/Views/Segments.aspx" PreventCollapse="True"
                                        Text="Main Page">
                                        <Items>
                                            <telerik:RadPanelItem runat="server" NavigateUrl="~/Views/Monitor/LabInfo.aspx" Text="Lab Monitor">
                                            </telerik:RadPanelItem>
                                        </Items>
                                    </telerik:RadPanelItem>
                                    <telerik:RadPanelItem runat="server" PreventCollapse="True" Text="Project Progress Views">
                                        <Items>
                                            <telerik:RadPanelItem runat="server" NavigateUrl="~/Views/Tasks/TasksList.aspx" Text="Assignments">
                                            </telerik:RadPanelItem>
                                            <telerik:RadPanelItem runat="server" NavigateUrl="~/Views/Tasks/CreateNewTask.aspx"
                                                Text="Create New Assignments">
                                            </telerik:RadPanelItem>
                                            <telerik:RadPanelItem runat="server" NavigateUrl="~/Views/Tasks/DataManagement.aspx"
                                                Text="Data Management">
                                            </telerik:RadPanelItem>
                                        </Items>
                                    </telerik:RadPanelItem>
                                    <telerik:RadPanelItem runat="server" PreventCollapse="True" Text="Administration Tasks">
                                        <Items>
                                            <telerik:RadPanelItem runat="server" NavigateUrl="~/Views/Management/Users.aspx"
                                                Text="Users Management">
                                            </telerik:RadPanelItem>
                                            <telerik:RadPanelItem runat="server" NavigateUrl="~/Views/Management/Segments.aspx"
                                                Text="Segments Management">
                                            </telerik:RadPanelItem>
                                            <telerik:RadPanelItem runat="server" NavigateUrl="~/Views/Management/Workstations.aspx"
                                                Text="Workstations Management">
                                            </telerik:RadPanelItem>
                                        </Items>
                                    </telerik:RadPanelItem>
                                </Items>
                            </telerik:RadPanelBar>
                        </telerik:RadSlidingPane>
                    </telerik:RadSlidingZone>
                </telerik:RadPane>
                <telerik:RadPane ID="BodySplitterPane" runat="server" Width="85%" CssClass="RadPaneLocationFix">
                    <asp:ContentPlaceHolder ID="MainContent" runat="server" />
                </telerik:RadPane>
            </telerik:RadSplitter>
         </ContentTemplate>
        </asp:UpdatePanel>
        </div>
    </div>
    <div class="clear">
        <telerik:RadAjaxLoadingPanel ID="AjaxDefaultLoadingPanel" runat="server" Width="100%"
            Height="100%" HorizontalAlign="Center">
        </telerik:RadAjaxLoadingPanel>
    </div>
    <input type="hidden" name="_ScreenWidth" id="_ScreenWidth" runat="server" value="1024" />
    <input type="hidden" name="_ScreenHeight" id="_ScreenHeight" runat="server" value="640" />
    </form>
</body>
</html>


Master Page .cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Security;
using Telerik.Web.UI;
 
namespace Intel.Diamond.Web
{
    public partial class TreePartMaster : System.Web.UI.MasterPage
    {
        protected void Page_Load( object sender, EventArgs e )
        {
            try
            {
                do
                {
                    if (!Page.IsPostBack)
                    {
                        //SetUpSideBarMenu();
                    }
 
 
                    SetUpSideBarMenu();
 
                } while (false);
 
            }
            catch (Exception ex)
            {
                string msg = ex.Message;
            }
        }
        private void SetUpSideBarMenu()
        {
            //MainSplitter.Width = new Unit( ScreenWidth * 0.95, UnitType.Pixel );
            //MainSplitter.Height = new Unit( ScreenHeight * 0.91, UnitType.Pixel );
 
            //SideBarSlidingPane.Width = new Unit( ScreenWidth * 0.15, UnitType.Pixel );
            //SideBarSlidingPane.Height = new Unit( ScreenHeight * 0.90, UnitType.Pixel );
 
            //SideBarMenu.Width = new Unit( ScreenWidth * 0.15, UnitType.Pixel );
 
            SideBarMenu.Items[0].Enabled = true;
            SideBarMenu.Items[1].Enabled = true;
            SideBarMenu.Items[2].Enabled = true;
 
 
            SideBarMenu.Items[0].Expanded = true;
            SideBarMenu.Items[1].Expanded = true;
            SideBarMenu.Items[2].Expanded = true;
 
        }
    }
}


The Default Page is Empty

<%@ Page Title="" Language="C#" MasterPageFile="~/TreePartMaster.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TesterWebApp.Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
</asp:Content>


Thanks
 George


Dobromir
Telerik team
 answered on 27 Apr 2011
1 answer
58 views
Hi,
  I'm not able to start_edit() a new node at the 2nd Level client-side if the parent node does not have any child previously and this is the only child.
Attached is the demo application I've done.

at the node.startEdit() statement it throws an error as: "htmlfile: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus."

to replicate the issue please try to add a new node at the 2nd level which does not have any children.

-Himanshu
Dimitar Terziev
Telerik team
 answered on 27 Apr 2011
3 answers
118 views
Hello,

It seems that the latest Release (2011 Q1) solved some of the issues with RadComboBox on IE9.

Though, There is still a problem with RTL support.

First time the control is loaded the selected item or the empty message are aligned to the left. only after
Selecting another item from the list, it fixes itself and then the item is aligned to the right as should be.

This behavior is happening in your demos as well. You can see that in the Right-To-Left demo the control
Loaded with the value "New York" selected and it aligned to the left, and after you choose another city
From the list, it fixes itself and get aligned to the right.

Do you have a solution for that wrong behavior ?

Regards,

Itamar
Helen
Telerik team
 answered on 27 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?