Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
86 views
Hi,

I have a problem with overlapping floating docks. If I try to open 2 consecutive floating dock in one Layout, second one overwhelm first. But if I move first one with my mouse than second one appears perfectly. How can I provide both appears without client handle...

You may find my adjusted code below.

PS: I'm using latest stable version of ASP.NET AJAX component (Telerik.Web.UI: 2010.3.1317.35)

Thanx.

.aspx part:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:HiddenField ID="hdnDeneme" runat="server" />
        <telerik:RadScriptManager ID="RadScriptManager1" 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>
        <script type="text/javascript">
            var latestDock;
            function DockCustomCommand(dock, args) {
                latestDock = dock;
                var commandElement = args.Command.get_element();
                document.getElementById("hdnDeneme").value = dock._index;
                showMenuAt(args.event, commandElement)
            }
            function showMenuAt(e, offsetElement) {
                var contextMenu = $find("RadContextMenu1");
                var bounds = $telerik.getBounds(offsetElement);
                var x = bounds.x + bounds.width;
                var y = bounds.y + bounds.height;
                contextMenu.showAt(x, y);
                $telerik.cancelRawEvent(e);
            }
        </script>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadContextMenu1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadDockLayout1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
          
        <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" Skin="Black">
        </telerik:RadSkinManager>
          
        <telerik:RadDockLayout ID="RadDockLayout1" runat="server">
            <telerik:RadDockZone ID="RadDockZone1" runat="server" Height="600px" Width="600px" Orientation="Horizontal">
            </telerik:RadDockZone>
        </telerik:RadDockLayout>
          
        <telerik:RadContextMenu ID="RadContextMenu1" runat="server"  OnItemClick="RadContextMenu1_ItemClick">
            <Items>
                <telerik:RadMenuItem Text="Change Title" Value="Title" />
                <telerik:RadMenuItem Text="Open Floating Dock" Value="FullBox" />
            </Items>
        </telerik:RadContextMenu>
    </form>
</body>
</html>


.cs part:
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
  
using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
  
public partial class Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        RadDock rd = null;
        DockCommand dc = new DockCommand()
        {
            Name = "Deneme",
            OnClientCommand = "DockCustomCommand"
        };
        for (int i = 0; i < 12; i++)
        {
            rd = new RadDock()
            {
                ID = "radDock" + i,
                EnableAnimation = true,
                EnableRoundedCorners = true,
                DockMode = DockMode.Docked,
                Width = 140,
                Height = 80,
                Title = "radDock" + i,
                Text = "Hi - " + i
            };
            rd.Style.Add(HtmlTextWriterStyle.Margin, "2px");
            rd.Commands.Add(dc);
            RadDockZone1.Controls.Add(rd);
        }
        rd.Dispose();
    }
  
    protected void RadContextMenu1_ItemClick(object sender, RadMenuEventArgs e)
    {
        switch (e.Item.Value)
        {
            case "FullBox":
                RadDock rd = new RadDock()
                {
                    ID = "hdd1",
                    DockMode = DockMode.Floating,
                    EnableAnimation = true,
                    EnableRoundedCorners = true,
                    EnableViewState = false,
                    Width = 200,
                    Title = "Floating",
                    Text = "Floating"
                };
                RadDockLayout1.Controls.Add(rd);
                rd.Dispose();
                break;
            case "Title":
                ((RadDock)RadDockZone1.Controls[Convert.ToInt32(hdnDeneme.Value)]).Title = e.Item.Value;
                break;
            default:
                break;
        }
    }
}
Pero
Telerik team
 answered on 07 Feb 2011
2 answers
53 views
i'd like to have the user be able to click a treeviewnode, to check/uncheck the radtreeview (with checkboxes enabled).
in other words, i use the click event of the node, and
  if the node is checked for that click event, uncheck it. 
  if the node is unchecked for that click event, check it.

this portion works to check and unchecked node, but when a checked node is selected, the node stays checked, and does not change to Unchecked.

 

 

 

//Changes check status of node when clicked
 function ClientNodeClicked(sender, eventArgs)
 {
    var node = eventArgs.get_node();
    if (node.checked)
        {
            node.set_checked(false);
        }     
    else if (!node.checked)
    {
         node.check();
    }
 }

i also tried node.uncheck();
but no success.

please help to have the node unchecked on the click event, if the node is checked.

JX
Top achievements
Rank 1
 answered on 07 Feb 2011
1 answer
97 views
say i have a tree with the option to check, being enabled:
Berries
    --> strawberries
    --> blueberries

what if i only want to select Berries, without selecting either strawberries or blueberries? the user does not now whether its strawberries or blueberries, but needs to enter that it is a Berry.

how can i allow a user to select a parent node only, without checking all childnodes?
i tried the function UpdateAllChildren which is readily used to set the checkstatus of the children, but it unchecks the parent as well.

this is what i tried
function clientNodeChecked(sender, eventArgs)
{
   var node = eventArgs.get_node();
   var childNodes = eventArgs.get_node().get_nodes();
   var isChecked = eventArgs.get_node().get_checked();
   UpdateAllChildren(childNodes, false); // i changed the parameter here to always be false so that childnodes are not checked when a parent is clicked. when a child is clicked, the parents will be set to indeterminate state as per normal procedure
  
   //i tried setting the code here to only select node (the parent node), it checked all the child nodes
 }
  
  
//checks or unchecks all nodes    
    function UpdateAllChildren(nodes, checked)
  {
   var i;
   for (i=0; i<nodes.get_count(); i++)
   {
       if (checked)
       {
           nodes.getNode(i).check();
       }
       else
       {
           nodes.getNode(i).set_checked(false);
       }
         
       if (nodes.getNode(i).get_nodes().get_count()> 0)
       {
           UpdateAllChildren(nodes.getNode(i).get_nodes(), checked);
       }
   }


JX
Top achievements
Rank 1
 answered on 07 Feb 2011
1 answer
61 views
Hello,

Please help me out to how to create running tabs at run time?
 Each Tab have one grid which related to the tab text.



Please reply ASAP.

Thanks,
Richa
Shinu
Top achievements
Rank 2
 answered on 07 Feb 2011
1 answer
59 views
Hi All,

Is it possible to change a specific column's filter menu texts on RadGrid demo version(i am not sure if there is any difference between demo and regular version) ?

suppose that, we have four columns. three with GridBoundColumn and one for GridTemplateColumn with CheckBox (ItemTemplate).
i am writing sample code for that column, as follows...

<telerik:GridTemplateColumn UniqueName="chkBox" DataField="isActive" FilterListOptions="VaryByDataType"
                    DataType="System.Boolean" CurrentFilterFunction="EqualTo"
                    HeaderText="Is Active"
                    AutoPostBackOnFilter="true" ItemStyle-Width="50px" FilterControlWidth="50px">
                    <ItemTemplate>
                        <asp:CheckBox ID="CheckBox1" runat="server" OnCheckedChanged="ToggleRowSelection"
                            AutoPostBack="True" Checked='<%#Bind("isActive") %>' />
                    </ItemTemplate>                   
                </telerik:GridTemplateColumn>

I need to change just this column's filter texts.

If i use FilterMenu.Items collection on Page_Load (or on similar event ), it affects all columns.

Do you know any solution ?

Thanks in advance...



Shinu
Top achievements
Rank 2
 answered on 07 Feb 2011
1 answer
45 views
Hi,

I have a problem with paging, when the last page has one item and I delete it, it succeeds but the grid doesn't show any items, I have to reload the page to see them. Am I missing something?

I'm generating the grid from an open access data source.

Thanks in advance



Princy
Top achievements
Rank 2
 answered on 07 Feb 2011
1 answer
153 views
Hi,

For an application I have to save the treeview checked items state. When users navigate away from the page and they come back the state of the selection must be persisted. I try to do this to save the collection of the checked items in a cookie or a Session.Item

The Session.Item is set every time on the OnNodeCheck event.
When I come back I set the checked nodes from the Session.Item but i think every time I set a checkbox the OnNodeCheck event is fired. Is that correct? What would be the best approach to keep the Checked state in memory so I can reproduce the treeview correctly?

BR,
Marc
Shinu
Top achievements
Rank 2
 answered on 07 Feb 2011
1 answer
60 views

my column is like this:

<telerik:GridBoundColumn DataField="TheIntegerColumn" HeaderText="Integer Value" FilterControlWidth="20px" DataType="System.Int32" HeaderStyle-Width="20px" 
                            SortExpression="TheIntegerColumn" UniqueName="TheIntegerColumn" ItemStyle-HorizontalAlign="Right">
</telerik:GridBoundColumn>

when I enter a random text instead of an integer into the filter, and select any option in the filter options dropdown, i get error
is this normal? or am I missing any settings in the grid?

thanks in advance
Princy
Top achievements
Rank 2
 answered on 07 Feb 2011
0 answers
92 views
Hi there,

File Version : 2009.1.402.35 (telerik.web.ui)

I am using Telerik controls for my many clients and works fine. Recently I have deliver one of solution to my one of new client.
This application works fine on our Dev and Test server.

However, it doesn't work at client's site and throws an exception when ajax is in play. I am not sure what the problem is. We don't have really good access to client's Server. So, if you can provide precise solution, I am happy to send it to client for fixing this bug.

Thanks in advance.

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)
Timestamp: Wed, 5 Jan 2011 22:48:57 UTC


Message: Sys.ScriptLoadFailedException: The script '/CMPRIDS/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_RadScriptManager1_HiddenField&compress=1&_TSM_CombinedScripts_=%3b' could not be loaded.
Line: 15
Char: 25312
Code: 0

ankit
Top achievements
Rank 1
 asked on 07 Feb 2011
26 answers
2.7K+ views

Hi,
just tried to make a simple tooltip - and got following javascript error when runing the page - 'Sys' is undefined
debug stops at:

Sys.WebForms.PageRequestManager._initialize(
'ScriptManager1', document.getElementById('form1'));

perhaps i missed something?
here aspx:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> 
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
    Namespace="System.Web.UI" TagPrefix="asp" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head id="Head1" runat="server">  
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <asp:ScriptManager ID="ScriptManager1" runat="server">  
    </asp:ScriptManager> 
    <div> 
            <asp:TextBox ID="txtWithTooltip" runat="server">123</asp:TextBox> 
            <img src="HelpIcon.gif" runat="server" ID="lblPrev" alt="" style="margin-left:17px;vertical-align:middle;"/>  
            <telerik:RadToolTip ID="RadToolTip1" runat="server" TargetControlID="txtWithTooltip" Text="This is a tooltip" IsClientID="true">  
            </telerik:RadToolTip> 
            <telerik:RadToolTip ID="RadToolTip2" runat="server" TargetControlID="lblPrev" Sticky="true" RelativeTo="Element" Skin="Web20Green" Position="BottomCenter" Text="Previous article: USNews Top 10" IsClientID="true">  
            </telerik:RadToolTip> 
      
    </div> 
    </form> 
</body> 
</html> 
 
Vishwanath
Top achievements
Rank 1
 answered on 05 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?