Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
114 views
Our web application has an aspx page that uses RadTreeView ( wrapper class  xcTreeView inherits RadTreeView) and RadTreeViewContextMenu for the context menus. The tree is built with all its nodes and associated context menus on each node.  The RadTreeView defines an event handler for onnodeexpand="trMenu_TreeNodePopulate".  When a user selects a node to expand, the event handler code behind determines if the node has permission to expand.  If this node is not permitted to expand, then I want to disable the right click context menus on that node. I've tried node.EnableContextMenu=false, but that doesn't seem to have any effect. What am I doing wrong? 

Here's some code snippets:

aspx.cs:
protected void trMenu_TreeNodePopulate(object sender, RadTreeNodeEventArgs e)
        {
             RadTreeNode node = e.Node;
             if (!treenav.PopulateNodefromXML(sender, node))
             {
                 e.node.EnableContextMenu = false;
             }
         }
 aspx:
<cc2:xcTreeView ID="trMenu"  runat="server" CssClass="TreeView" PersistLoadOnDemandNodes="true"
    NodeIndent="15" OnClientNodeClicking="onNodeClicking" OnClientMouseOver="ClientMouseOver"
    onnodeexpand="trMenu_TreeNodePopulate" ShowLines="True" Style="border-top-style: none;
    border-right-style: none; border-left-style: none; border-bottom-style: none;"  Skin="Outlook"   Font-Names="'Asap',Tahoma"   MultipleSelect="true"
    Width="99%" meta:resourcekey="trMenuResource1" SingleExpandPath="false" OnContextMenuItemClick="tree_ContextClicked" onClientContextMenuShown="ClientContextMenuShown" 
    OnClientContextMenuShowing="ClientContextMenuShowing">
    <ContextMenus>
        <telerik:RadTreeViewContextMenu Skin="Outlook" ID="EmptyMenu" runat="server" Width="30px"  >
            <Items>
            <telerik:RadMenuItem   IsSeparator="true"></telerik:RadMenuItem>
            </Items>
        </telerik:RadTreeViewContextMenu>
        <telerik:RadTreeViewContextMenu Skin="Outlook"  Font-Size="10pt" ID="FARMCMenu"   runat="server" Font-Names="'Asap',Tahoma">
            <Items>
            </Items>
                                                             
                <CollapseAnimation Type="None" />
        </telerik:RadTreeViewContextMenu>
            <telerik:RadTreeViewContextMenu Skin="Outlook"  Font-Size="10pt" ID="WAPCMenu" runat="server"  Font-Names="'Asap',Tahoma">
            <Items>
            </Items>
                                                            
                <CollapseAnimation Type="None" />
        </telerik:RadTreeViewContextMenu>
            <telerik:RadTreeViewContextMenu Skin="Outlook"  Font-Size="10pt" ID="SITECMenu" runat="server"  Font-Names="'Asap',Tahoma">
            <Items>
            </Items>
                                                               
                <CollapseAnimation Type="None" />
        </telerik:RadTreeViewContextMenu>
    </ContextMenus>
                                                     
</cc2:xcTreeView>

Betty
Top achievements
Rank 1
 answered on 14 Jan 2015
2 answers
101 views
Hi

Looking for some advice on how / where you save the recurrence rules, and the exceptions IE when you edit 'this occurrence'  rather than series.

Ideally I'd like these in a database, so I can search not only for appointments but clear slots also.

Andy
Boyan Dimitrov
Telerik team
 answered on 14 Jan 2015
1 answer
44 views
(Not sure which forum this belongs in.)

I have an app which has Telerik Asp.Net references in all pages including the master pages.
In my master page I have the usual RadScriptManager references to the Telerik jQuery js files.

I have a start up routine that references an HTML input control (not an ASP.Net control, just <input type="button"... etc.  although it has runat='server')

The JavaScript function itself is as follows:
   $(document).ready(function () {                                                                
        var hf = "<%= hfStartTimer.Value %>";
        timeoutButton = $get('btnTimeout');
        timeoutButton.style.visibility = 'hidden';
        if (hf == 'true') {                           
            timerHandle = setTimeout(function () {                             
            startCounter();
         }, "<%= hfTimeOut.Value %>");
      }
   })

The problem is that this works perfectly in Chrome and Firefox but not in IE10 or 11.  It crashes.  The $get returns null for btnTimeout.

Suggestions?
 
Boris
Top achievements
Rank 1
 answered on 14 Jan 2015
1 answer
200 views
Hi,

I have a problem with the RadGrid and the create/update popup.

The radgrid is in a modal dialog (call with javascript showModalDialog).  

<telerik:RadGrid ID="grdExternalCosts" runat="server" AllowPaging="True" ShowFooter="true" AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="true" OnPreRender="grdExternalCosts_PreRender" OnNeedDataSource="grdExternalCosts_NeedDataSource" OnUpdateCommand="grdExternalCosts_UpdateCommand" OnInsertCommand="grdExternalCosts_InsertCommand" DeleteCommand="grdExternalCosts_DeleteCommand">
<MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="ExternalCostID" EditMode="PopUp">
   <EditFormSettings>
     <PopUpSettings Modal="false" ZIndex="500" />
   </EditFormSettings>
   <Columns>
   ...
  </Columns>
   <EditFormSettings UserControlName="ExternalCostsDetail.ascx" EditFormType="WebUserControl">
      <EditColumn UniqueName="EditCommandColumn1"></EditColumn>
   </EditFormSettings>
</MasterTableView>
</telerik:RadGrid>

The modal screen is showing nicely but when I click the add new record button, I get an error saying 'the session has expired. The window will be closed. Refresh the main page before continuing'.  And when I look at the hyperlink it is the same as the page that I have in the modal dialog, not the user control for inserting a new record. 

What can I do to fix this?

Kind regards

Suzy 
Konstantin Dikov
Telerik team
 answered on 14 Jan 2015
2 answers
105 views
Hi,

I'm facing very odd behavior with RadGrid and WebForms MVP. Long story short is that during paging ObjectDatasource calls for Select method twice. 

I compared it with standard ASP GridView and it works well, just a single call. Can please somebody tell me a secret - why is that happening?

I'm attaching an example website solution with examples of RadGrid (radgrid.aspx) and GridView (AspGridView.aspx), both userControls have the same codeBehind, difference is only in grid (radGrid or GridView). Just put a breakpoint on Select method, and you will notice that every time you change the page in Telerik's grid, datasource is being asked twice.

https://drive.google.com/file/d/0B3Da7JHcNzvcNGdrU2lna3BFYUE/view?usp=sharing

Thank you
Vasil
Telerik team
 answered on 14 Jan 2015
1 answer
672 views
Hi,

I'm trying to create a grid with a template column - see below.    Please see attached print screen.  There is something that looks weird behind the button.  I don't know how to fix this.

        <telerik:RadGrid ID="grd" runat="server" AutoGenerateColumns="False">
            <ClientSettings>
                <Scrolling AllowScroll="true" ScrollHeight="300px" UseStaticHeaders="true" />  
            </ClientSettings> 
            <MasterTableView AutoGenerateColumns="False" TableLayout="Fixed" DataKeyNames="OrderId">
                <Columns  >
                    <telerik:GridTemplateColumn UniqueName="TemplateColumn">
                        <ItemTemplate >
                            <telerik:RadButton ID="id" runat="server" Text='<%# Eval("Id") %>'></telerik:RadButton>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>

Thanks for your help.
            </MasterTableView>
        </telerik:RadGrid>






Maria Ilieva
Telerik team
 answered on 14 Jan 2015
6 answers
681 views
Hi,
What is the property or how I can show the calendar so that users can only select a specific day. Example: Only Saturday.

Thanks,
Vasil
Telerik team
 answered on 14 Jan 2015
1 answer
203 views
I have created a sample web site that consists of a Master Page with a RadTabStrip and three tabs that link to three content pages ==> PageOne.aspx, PageTwo.aspx, and PageThree.aspx. The Master Page displays the current date/time which changes as each new tab is clicked.

My question, is there a way to have the new pages load without having to reload the Master Page, using Ajax or something. In this simple example, the date / time would not update as each new tab is clicked.

If so, how would I do this.  How would I change this.

<%@ Master Language="VB" CodeFile="MasterPage.master.vb" 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>Untitled Page</title>
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
   <form id="form1" runat="server">
   <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
   </telerik:RadScriptManager>
   <div>
      <asp:Label ID="lblDateTime" runat="server" Text="Label"></asp:Label>
   </div>
   <div>
      <telerik:RadTabStrip ID="RadTabStrip" runat="server">
         <Tabs>
            <telerik:RadTab Text="Page One" NavigateUrl="PageOne.aspx" Value="PageOne.aspx"></telerik:RadTab>
            <telerik:RadTab Text="Page Two" NavigateUrl="PageTwo.aspx" Value="PageTwo.aspx"></telerik:RadTab>
            <telerik:RadTab Text="Page Three" NavigateUrl="PageThree.aspx" Value="PageThree.aspx"></telerik:RadTab>
         </Tabs>
      </telerik:RadTabStrip>
      <br /><br />
      <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
         
      </asp:ContentPlaceHolder>
   </div>
   </form>
</body>
</html>
 
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="PageOne.aspx.vb" Inherits="PageOne" %>
 
<%@ MasterType VirtualPath="~/MasterPage.master" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
   <b>Page One</b>
</asp:Content>
 
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="PageTwo.aspx.vb" Inherits="PageOne" %>
 
<%@ MasterType VirtualPath="~/MasterPage.master" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
   <b>Page Two</b>
</asp:Content>
 
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="PageThree.aspx.vb" Inherits="PageOne" %>
 
<%@ MasterType VirtualPath="~/MasterPage.master" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
   <b>Page Three</b>
</asp:Content>
 
On Page Load
Public Sub SetCurrentTab()
      Dim tab As RadTab = RadTabStrip.FindTabByValue(System.IO.Path.GetFileName(Request.Url.ToString()))
 
      If tab IsNot Nothing Then
         tab.Selected = True
      End If
   End Sub
End Class

Boyan Dimitrov
Telerik team
 answered on 14 Jan 2015
1 answer
149 views
Greetings,

Has anybody uploaded a library of custom RadButton icons anywhere?  I would love to get ahold of some icons that extend the embedded icons for additional features like a calculator or a cash register or dollar sign.

Thank you!

Matt
Danail Vasilev
Telerik team
 answered on 14 Jan 2015
3 answers
98 views
I noticed that if you enlarge the width of the box and then release your mouse button, you cannot reduce the width of the box to less than what it was when you released the button previously.

Any suggestions would be great!

Thanks,
Bala
Danail Vasilev
Telerik team
 answered on 14 Jan 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?