Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
206 views
Hi,

I have the following scenario.

Creating Treeview Control in .aspx file as follows:

                            <telerik:RadTreeView ID="WinFabExplorerMenu" runat="server" OnNodeExpand="WinFabExplorerMenu_NodeExpand" OnClientNodeClicked="ClientNodeClicked">
                            </telerik:RadTreeView>

On client side, adding node to the tree and set expand mode to server side call back. After this, when I clicked the + sign on the node, the server side node expand event not firing.

function OnFederationTileClicked(sender, args) {
    $('#collapseOne').collapse('hide');
    var tree = $find("ctl00_MainContent_WinFabExplorerMenu");
    tree.trackChanges();
    tree.get_nodes().clear();
    var node = new Telerik.Web.UI.RadTreeNode();
    node.set_text(sender.get_navigateUrl());
    node.set_category('Root');
    node.set_expanded(false);
    var attributes = node.get_attributes();
    attributes.setAttribute("Federation", sender.get_navigateUrl());
    attributes.setAttribute("Path", "Test");
    node.set_expandMode(Telerik.Web.UI.TreeNodeExpandMode.ServerSideCallBack);
    node.set_postBack(true);
    tree.get_nodes().add(node);
    tree.commitChanges();
}
Skb Dev
Top achievements
Rank 1
 answered on 26 Mar 2015
2 answers
553 views
Hello,

I'm using the ASP.NET AJAX pageLoad()-method inside my javascript to attach e.g. a click event to a task of the gantt control. But it seems that this pageLoad()-method will not be invoked anymore if I collapse a task. And even if I expand that task again, the pageLoad()-method inside my javascript-code is not called anymore, too. The $(document).ready()-function is not working in my case because I add a special css-class as a bookmark to attach the click-event and this must happen on every page load. I hope you can help me.

Regards,
Felix
Felix
Top achievements
Rank 1
 answered on 26 Mar 2015
1 answer
109 views
Hello Team,

I am working on one web applicaiton, where we are using radgrid with linkbutton inside template column.

On click of link button we are opening radwindow with a radgrid inside.

On click of link button radwindow opens perfect with rebinding grid inside.

The issue is on click of linkbutton it refresh the grid before opening radwindow.

Can anyone help me out with this?

Thanks in Advance,
Ruchi Patel

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DemoPage.aspx.cs" Inherits="DemoApp.DemoPage" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
            <telerik:RadScriptBlock ID="scrCode_Outlier" runat="server">
                <script type="text/javascript">
                    function OpenRadWin(ID) {
                        debugger
                        <%--document.getElementById("<%=hdnValue.ClientID %>").setAttribute('value', ID);--%>
                        var wnd = $find("<%=rdRTOutlierWindow.ClientID %>");
                        wnd.show();
                    }
                </script>
            </telerik:RadScriptBlock>
            <telerik:RadAjaxManager ID="radmgr" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="rgRTOutlierView">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="rgRTOutlierView"></telerik:AjaxUpdatedControl>
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
            <telerik:RadWindow ID="rdRTOutlierWindow" runat="server" Modal="true" ReloadOnShow="true" MinWidth="1000px" MinHeight="400px" EnableViewState="true">
                <ContentTemplate>
                    <telerik:RadAjaxPanel ID="rdpnl_RTDetail" runat="server">
                        <telerik:RadGrid ID="rgRTOutlierDetail" runat="server" AllowPaging="True" AllowSorting="true" AutoGenerateColumns="true" ClientSettings-EnablePostBackOnRowClick="false" OnNeedDataSource="rgRTOutlierDetail_NeedDataSource"
                            ExportSettings-IgnorePaging="true" ExportSettings-ExportOnlyData="true" ExportSettings-Excel-Format="Biff" MasterTableView-CommandItemSettings-ShowExportToExcelButton="true" MasterTableView-CommandItemSettings-ShowExportToCsvButton="true" MasterTableView-CommandItemSettings-ShowExportToPdfButton="true">
                            <MasterTableView DataKeyNames="ID">
                                <CommandItemSettings ShowAddNewRecordButton="false" />
                                <Columns></Columns>
                            </MasterTableView>
                        </telerik:RadGrid>
                    </telerik:RadAjaxPanel>
                </ContentTemplate>
            </telerik:RadWindow>
 
            <telerik:RadAjaxPanel ID="rdpnl_RT" runat="server" LoadingPanelID="LoadingPanel1" Width="700px" Height="300px">
 
                <telerik:RadGrid ID="rgRTOutlierView" runat="server" AllowPaging="True" AllowSorting="true" AutoGenerateColumns="false" Width="100%"
                    OnNeedDataSource="rgRTOutlierView_NeedDataSource" OnItemCommand="rgRTOutlierView_ItemCommand"
                    PageSize="2" EnablePostBackOnRowClick="true" MasterTableView-CommandItemDisplay="Bottom">
                    <MasterTableView CommandItemDisplay="Bottom" DataKeyNames="ID">
                        <CommandItemSettings ShowAddNewRecordButton="false" />
                        <Columns>
                            <telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Detail" DataField="ID" UniqueName="ID" HeaderStyle-Width="10%">
                                <ItemTemplate>
                                    <asp:LinkButton ID="hylnkAccn" runat="server" CommandName="Detail" CommandArgument='<%# Eval("ID") %>' Text="Detail" OnClientClick='<%# "OpenRadWin(" + Eval("ID") + ");" %>'></asp:LinkButton><%--OnClientClick='<%# "OpenRadWin(" + Eval("ID") + ");" %>'--%>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn DataField="ID" HeaderText="ID" HeaderStyle-Width="10%"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="UserName" HeaderText="UserName" HeaderStyle-Width="20%"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Education" HeaderText="Education" HeaderStyle-Width="20%"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Education" HeaderText="Education" HeaderStyle-Width="30%"></telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                    <ClientSettings>
                        <Selecting AllowRowSelect="True" />
                        <ClientEvents OnCommand="RadGridCommand" />
                        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                    </ClientSettings>
                </telerik:RadGrid>
                <telerik:RadCodeBlock runat="server" ID="radcode1">
                    <script type="text/javascript">
                        function RadGridCommand(sender, args) {
                            debugger
                            if (args.get_commandName() == "Detail") {
                                var itemIndex = args.get_commandArgument();
                                var rowID = (itemIndex != null && itemIndex != undefined && itemIndex != "") ? args.get_tableView()._dataSource[itemIndex].ID : 0;
                                OpenRadWin(rowID);
                            }
                            args.set_cancel(true);
                        }
 
                    </script>
                </telerik:RadCodeBlock>
            </telerik:RadAjaxPanel>
        </div>
    </form>
</body>
</html>
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
 
namespace DemoApp
{
    public partial class DemoPage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                rgRTOutlierView.DataBind();
            }
        }
 
        protected void rgRTOutlierView_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            //(sender as RadGrid).DataSource = GetDataTable();
 
            rgRTOutlierView.DataSource = GetDataTable();
 
        }
        protected void rgRTOutlierView_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            if (e.CommandName.ToLower().Equals("detail"))
            {
                rgRTOutlierDetail.Rebind();
            }
        }
        public DataTable GetDataTable()
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("Id", typeof(string));
            dt.Columns.Add("UserName", typeof(string));
            dt.Columns.Add("Education", typeof(string));
            dt.Columns.Add("Location", typeof(string));
 
            DataRow dtrow = dt.NewRow();   
            dtrow["Id"] = 1;           
            dtrow["UserName"] = "SureshDasari";
            dtrow["Education"] = "B.Tech";
            dtrow["Location"] = "Chennai";
            dt.Rows.Add(dtrow);
 
            dtrow = dt.NewRow();       
            dtrow["Id"] = 2;           
            dtrow["UserName"] = "MadhavSai";
            dtrow["Education"] = "MBA";
            dtrow["Location"] = "Nagpur";
            dt.Rows.Add(dtrow);
 
            dtrow = dt.NewRow();       
            dtrow["Id"] = 3;           
            dtrow["UserName"] = "MaheshDasari";
            dtrow["Education"] = "B.Tech";
            dtrow["Location"] = "Nuzividu";
            dt.Rows.Add(dtrow);
 
            dtrow = dt.NewRow();       
            dtrow["Id"] = 4;           
            dtrow["UserName"] = "Mahendra";
            dtrow["Education"] = "CA";
            dtrow["Location"] = "Guntur";
            dt.Rows.Add(dtrow);
 
            return dt;
        }
 
        protected void rgRTOutlierDetail_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            rgRTOutlierDetail.DataSource = GetDataTable();
        }
 
    }
}

Marin Bratanov
Telerik team
 answered on 26 Mar 2015
1 answer
52 views
Hello

For several year that I'm using Load on Demand based on XML. I start notice some failures lately and I saw that the fastest way is using a Web Service. Can I build new nodes calling a Web Service and change the node image?
Peter Filipov
Telerik team
 answered on 26 Mar 2015
3 answers
155 views
When I am trying to brows Asp.netAjax live demo in my machine it displays error message: the error is like this
A network-related or instance-specific error occured while establishing a connection to SQL server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL server is configured to allow remote connections.  (Provider:SQL Network Interface, error: 26-Error locating server/Instance specified)

Is there any means to fix this problem?
Dimitar
Telerik team
 answered on 26 Mar 2015
6 answers
188 views
Hi
 How we can find control in DataFrom ASP.net from client side.

Thanks


 
Eyup
Telerik team
 answered on 26 Mar 2015
2 answers
623 views
Hi All,
Just wondering how can I update parent control from child user control?
Here's the structure of my Page
Master Page
    Parent Aspx with my radmenu
         User Control with button.

When I click on my button it updates my radmenu when theres postback,
but when its ajaxified my radmenu wont update.

Any code I could use to link child to update parent control with Ajax.

Thanks in advance,
RJ
RJ
Top achievements
Rank 1
 answered on 26 Mar 2015
1 answer
110 views
I have a radscheduler and the date that shows up in the header is very dark.  I have used other radschedulers in my application and did not have this problem, so I have to believe that it is something I did with this specific one.  I have attached a screenshot of the code for the radscheduler and a screenshot of the problem.  Any help is appreciated.
Kevin
Top achievements
Rank 1
 answered on 25 Mar 2015
1 answer
213 views
Hai, i got a problem using RadDateTimePicker.
I'm using a css class to apply style on button globally
The CSS style is like this:

button, input[type="button"], input[type="submit"]
 {
 border:2px solid #DFDFDF; -webkit-border-radius: 6px; -moz-border-radius: 6px;
 font-size:11px;font-family:tahoma, verdana, arial, sans-serif; padding: 4px 12px 4px 12px; text-decoration:none; display:inline-block;font-weight:bold; color: #141414;
 background-color: #E6E6E6; background-image: -webkit-gradient(linear, left top, left bottom, from(#E6E6E6), to(#CCCCCC));
 background-image: -webkit-linear-gradient(top, #E6E6E6, #CCCCCC);
 background-image: -moz-linear-gradient(top, #E6E6E6, #CCCCCC);
 background-image: -ms-linear-gradient(top, #E6E6E6, #CCCCCC);
 background-image: -o-linear-gradient(top, #E6E6E6, #CCCCCC);
 cursor: pointer;
  }
   
button, input[type="button"], input[type="submit"]:hover
{
    cursor: pointer;
    color: #414141;
    background-color: #cdcdcd; background-image: linear-gradient(to bottom, #cdcdcd, #b3b3b3);
 }
   
button, input[type="button"], input[type="submit"]:disabled
{
    opacity: 0.65;
    cursor: not-allowed;
}

and it makes the button ("Today", "OK", "Cancel") inside Calendar in RadDateTimePicker (On Calendar, Click on month, and it shows the button) is looks like disabled, and the cursor is "not-allowed" when i hover on it.

How to override the style on the button?

I have attach the image, it looks like disabled and the cursor is "not-allowed" (the screenshot in windows doesn't shows cursor, but believe me it's changed) 
Konstantin Dikov
Telerik team
 answered on 25 Mar 2015
1 answer
62 views
I have a webpage that has 2 user controls on it. In one user control i have a RadMenu. In the other user control, underneath the first user control, a flash movie object is placed, When I am developing and I run the application on my machine using either IE or Firefox as my default, the RadMenu displays over the flash movie. I then deploy the code to my development server. When I run the application (development server) using the Firefox browser on my machine the RadMenu displays over the flash movie.

When I run the application (development server) using IE browser on my machine the RadMenu displays behind the flash movie. This is the same IE (version 8) that my machine uses when running it locally on my machine.

I have tried everything but cannot see what is wrong. Attached is the code being generated using FireFox (embed) and IE(object). In both cases the wmode is set to opaque.Any thoughts on why it is displaying behind the flash movie when running IE using the development server only?
Ivan Danchev
Telerik team
 answered on 25 Mar 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?