Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
98 views
Hi

I have a RadGrid with a NestedViewTemplate and a CommandItemTemplate.  When I click the ExpandCollapse button on a row to see the contents of the NestedView, the controls in the CommandItem area disappear.

Anyone experience this issue and/or know how to fix it.

Thanks
Princy
Top achievements
Rank 2
 answered on 27 Jun 2013
12 answers
580 views

The confirm window feature has worked as required for us at the master level of the radgrid. We, were successfully able to set custom radwindow title and confirmation text in the ItemCreated method. However, the radwindow’s title doesn’t seem to appear in the child record even though it has been set in the ItemCreated method. Please see attached code.  I am not sure if this is a bug or code implementation issue.

 

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ConfirmationLocalized._Default" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title></title>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
            <Scripts> 
                <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 Path="~/jquery-telerik.js" /> 
            </Scripts> 
        </telerik:RadScriptManager> 
        <telerik:RadGrid ID="dtgShipper" runat="server" AutoGenerateColumns="False" GridLines="None" 
            OnDetailTableDataBind="dtgShipper_DetailTableDataBind" OnNeedDataSource="dtgShipper_NeedDataSource" 
            OnItemCommand="dtgShipper_ItemCommand" OnItemCreated="dtgShipper_ItemCreated">  
            <HeaderContextMenu> 
                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
            </HeaderContextMenu> 
            <MasterTableView AllowPaging="True" DataKeyNames="id" PageSize="5" ShowHeader="False">  
                <DetailTables> 
                    <telerik:GridTableView runat="server" AllowPaging="True" PageSize="5" AutoGenerateColumns="False" 
                        ShowHeader="False">  
                        <RowIndicatorColumn> 
                            <HeaderStyle Width="20px"></HeaderStyle> 
                        </RowIndicatorColumn> 
                        <ExpandCollapseColumn> 
                            <HeaderStyle Width="20px"></HeaderStyle> 
                        </ExpandCollapseColumn> 
                        <Columns> 
                            <telerik:GridBoundColumn DataField="carriername" UniqueName="column1" ItemStyle-Width="85%">  
                                <ItemStyle Width="85%"></ItemStyle> 
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="pieces" UniqueName="column2" ItemStyle-Width="85%">  
                                <ItemStyle Width="85%"></ItemStyle> 
                            </telerik:GridBoundColumn> 
                            <telerik:GridButtonColumn CommandArgument="Child" ConfirmDialogType="RadWindow" ButtonType="ImageButton" 
                                ItemStyle-Width="20" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" 
                                ConfirmText="Delete this record?" ConfirmTitle="Delete Confirm" ImageUrl="App_Themes/TEST/Images/delete.png">  
                                <ItemStyle Width="20px"></ItemStyle> 
                            </telerik:GridButtonColumn> 
                        </Columns> 
                    </telerik:GridTableView> 
                </DetailTables> 
                <RowIndicatorColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn Visible="True">  
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </ExpandCollapseColumn> 
                <Columns> 
                    <telerik:GridBoundColumn DataField="shippername" UniqueName="column1">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridButtonColumn CommandArgument="Child" ConfirmDialogType="RadWindow" ButtonType="ImageButton" 
                        ItemStyle-Width="20" CommandName="Delete" Text="Delete" UniqueName="DeleteColumnMaster" 
                        ConfirmText="Delete this shipper record?" ConfirmTitle="Delete Confirm" ImageUrl="App_Themes/TEST/Images/delete.png">  
                        <ItemStyle Width="20px"></ItemStyle> 
                    </telerik:GridButtonColumn> 
                </Columns> 
                <PagerStyle Mode="NumericPages" /> 
            </MasterTableView> 
            <FilterMenu EnableTheming="True">  
                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
            </FilterMenu> 
        </telerik:RadGrid> 
    </div> 
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">  
    </telerik:RadWindowManager> 
    </form> 
</body> 
</html> 
 
using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using System.Data;  
using System.Data.Linq;  
using System.Data.Linq.Mapping;  
using System.Linq.Expressions;  
 
using Telerik.Web.UI;  
 
namespace ConfirmationLocalized  
{  
    public partial class _Default : System.Web.UI.Page  
    {  
 
        /// <summary>  
        /// Set page theme  
        /// </summary>  
        /// <param name="sender"></param>  
        /// <param name="e"></param>  
        void Page_PreInit(object sender, EventArgs e)  
        {  
            this.Page.Theme = "TEST";  
        }  
 
        protected void Page_Load(object sender, EventArgs e)  
        {  
 
        }  
 
        /// <summary>  
        /// Return shipper resultset  
        /// </summary>  
        /// <returns></returns>  
        private List<Table1> LoadShippers()  
        {  
            List<Table1> shipperResult = new List<Table1>();  
 
            Table1 shipper = new Table1();  
            shipper.ID = 1;  
            shipper.ShipperName = "ABC inc.";  
 
            shipperResult.Add(shipper);  
 
            shipper = new Table1();  
            shipper.ID = 2;  
            shipper.ShipperName = "ABC2 inc.";  
 
            shipperResult.Add(shipper);  
 
            return shipperResult;  
        }  
 
        /// <summary>  
        /// Returns pending shipment result set  
        /// </summary>  
        /// <returns></returns>  
        private List<Table2> LoadPendingData()  
        {  
            List<Table2> listResult = new List<Table2>();  
 
            Table2 itemResult = new Table2();  
 
            itemResult.carrierkey = 1;  
            itemResult.carriername = "A";  
            itemResult.pieces = 11;  
 
            listResult.Add(itemResult);  
 
            itemResult = new Table2();  
 
            itemResult.carrierkey = 2;  
            itemResult.carriername = "AA";  
            itemResult.pieces = 22;  
 
            listResult.Add(itemResult);  
 
            itemResult = new Table2();  
 
            itemResult.carrierkey = 3;  
            itemResult.carriername = "BAC";  
            itemResult.pieces = 33;  
 
            listResult.Add(itemResult);  
 
            return listResult;  
 
 
 
 
 
        }  
          
        /// <summary>  
        /// Loads shipper result set to grid  
        /// </summary>  
        /// <param name="source"></param>  
        /// <param name="e"></param>  
        protected void dtgShipper_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
        {  
            this.dtgShipper.DataSource = this.LoadShippers();  
        }  
 
        /// <summary>  
        /// Loads child records for each shipper  
        /// </summary>  
        /// <param name="source"></param>  
        /// <param name="e"></param>  
        protected void dtgShipper_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)  
        {  
            GridDataItem parentItem = e.DetailTableView.ParentItem as GridDataItem;  
            e.DetailTableView.DataSource = this.LoadPendingData();  
            e.DetailTableView.DataMember = "Child";  
        }  
 
        protected void dtgShipper_ItemCommand(object source, GridCommandEventArgs e)  
        {  
 
        }  
 
        /// <summary>  
        /// Set custom confirm message and title  
        /// this could be used to set localized strings  
        /// </summary>  
        /// <param name="sender"></param>  
        /// <param name="e"></param>  
        protected void dtgShipper_ItemCreated(object sender, GridItemEventArgs e)  
        {  
 
              
            // Set Parent records custom message and title  
            foreach (GridColumn column in this.dtgShipper.MasterTableView.RenderColumns)  
            {  
                if (column is GridButtonColumn)  
                {  
                    if (column.UniqueName == "DeleteColumnMaster")  
                    {  
                        (column as GridButtonColumn).ConfirmText = "Delete this master record?";  
 
                        // Following title appears on the radwinow  
                        (column as GridButtonColumn).ConfirmTitle = "Delete master confirm";  
                    }  
                }  
            }  
 
            // Set chil records custom message and title  
            foreach (GridColumn column in this.dtgShipper.MasterTableView.DetailTables[0].RenderColumns)  
            {  
                if (column is GridButtonColumn)  
                {  
                    if (column.UniqueName == "DeleteColumn")  
                    {  
                        (column as GridButtonColumn).ConfirmText = "Delete this child record?";  
 
                         //Following title doesnt appear on the rad window  
                        (column as GridButtonColumn).ConfirmTitle = "Delete child confirm";  
                    }  
                }  
            }  
        }  
    }  
 
 
    /// <summary>  
    /// shipper table  
    /// </summary>  
    [Table(Name = "dbo.Table1")]  
    public partial class Table1  
    {  
        private int _id;  
        private string _shipperName;  
 
        public int ID {   
              
            get{return this._id ;}  
            set { this._id = value; }   
        }  
 
        public string ShipperName {  
            get { return this._shipperName; }  
            set { this._shipperName = value; }   
        }  
 
    }  
 
    /// <summary>  
    /// Pending shipment table  
    /// </summary>  
    [Table(Name = "dbo.Table2")]  
    public partial class Table2  
    {  
 
        private string _carriername;  
 
        private System.Nullable<int> _pieces;  
 
        private System.Nullable<double> _weight;  
 
        private int _carrierkey;  
 
        private string _unitid;  
 
        private System.Nullable<int> _shipperkey;  
 
        private System.Nullable<int> _companykey;  
 
        public Table2()  
        {  
        }  
 
        [Column(Storage = "_carriername", DbType = "NVarChar(50)")]  
        public string carriername  
        {  
            get 
            {  
                return this._carriername;  
            }  
            set 
            {  
                if ((this._carriername != value))  
                {  
                    this._carriername = value;  
                }  
            }  
        }  
 
        [Column(Storage = "_pieces", DbType = "Int")]  
        public System.Nullable<int> pieces  
        {  
            get 
            {  
                return this._pieces;  
            }  
            set 
            {  
                if ((this._pieces != value))  
                {  
                    this._pieces = value;  
                }  
            }  
        }  
 
        [Column(Storage = "_weight", DbType = "Float")]  
        public System.Nullable<double> weight  
        {  
            get 
            {  
                return this._weight;  
            }  
            set 
            {  
                if ((this._weight != value))  
                {  
                    this._weight = value;  
                }  
            }  
        }  
 
        [Column(Storage = "_carrierkey", DbType = "Int NOT NULL")]  
        public int carrierkey  
        {  
            get 
            {  
                return this._carrierkey;  
            }  
            set 
            {  
                if ((this._carrierkey != value))  
                {  
                    this._carrierkey = value;  
                }  
            }  
        }  
 
        [Column(Storage = "_unitid", DbType = "VarChar(25)")]  
        public string unitid  
        {  
            get 
            {  
                return this._unitid;  
            }  
            set 
            {  
                if ((this._unitid != value))  
                {  
                    this._unitid = value;  
                }  
            }  
        }  
 
        [Column(Storage = "_shipperkey", DbType = "Int")]  
        public System.Nullable<int> shipperkey  
        {  
            get 
            {  
                return this._shipperkey;  
            }  
            set 
            {  
                if ((this._shipperkey != value))  
                {  
                    this._shipperkey = value;  
                }  
            }  
        }  
 
        [Column(Storage = "_companykey", DbType = "Int")]  
        public System.Nullable<int> companykey  
        {  
            get 
            {  
                return this._companykey;  
            }  
            set 
            {  
                if ((this._companykey != value))  
                {  
                    this._companykey = value;  
                }  
            }  
        }  
    }  
}  
 

Emerson
Top achievements
Rank 1
 answered on 27 Jun 2013
0 answers
85 views
Hello,

I am trying to bind Rascheduler on date change/navigation change/day or week view change. But when I try to bind, I do not get new date selected in UI.

Is there a preferred approach? If I bind all my records once, the navigation works fine.
But I want to bind initially on todays date and after based on the date selected or when navigation changes.

Thanks,
Anil

Anil
Top achievements
Rank 1
 asked on 27 Jun 2013
2 answers
59 views
Hi,

I am using the RadWindow control to create new Tenants in a RadDropDownList, I just want a simple form that captures the info and Save.

Functionality wize its working 100% but it looks horrible and I cannot figure out why its happening, tried a few settings like Render Mode, Skin etc.

I have attached a screenshot of how it looks, renders the same in IE and Chrome.

Here the window code in my ASPX (wrapped in a RadUpdatePanel could this cause the issue?):
<telerik:RadWindow runat="server" ID="winNewTenant" Width="500px" Height="200px" Modal="true" Behaviors="None" EnableTheming="True" Skin="WebBlue">
            <ContentTemplate>
                <table>
                    <tr>
                        <td class="tdlabel">
                            Tenant Name
                        </td>
                        <td>
                            <telerik:RadTextBox runat="server" ID="txtTenantName" Width="300px" />
                        </td>
                    </tr>
                    <tr>
                        <td class="tdlabel">
                            Trading As
                        </td>
                        <td>
                            <telerik:RadTextBox runat="server" ID="txtTradingAs" Width="300px" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                              
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <telerik:RadButton runat="server" ID="btnSaveTenant" Text="Save" CausesValidation="true" ButtonType="SkinnedButton" Skin="WebBlue" OnClick="btnSaveTenant_Click" />
                              
                            <telerik:RadButton runat="server" ID="btnCancelTenant" Text="Cancel" CausesValidation="false" ButtonType="SkinnedButton" Skin="WebBlue" OnClick="btnCancelTenant_Click" />
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </telerik:RadWindow>

Paul
Top achievements
Rank 1
 answered on 26 Jun 2013
4 answers
140 views
Hi,

I am struggling with a problem that I cannot resolve. I get a whitespace above the grid headers when I am using any other Skin than default, with the default skin it looks fine, but I am using WebBlue and its got this nasty whitespace.

Secondly I use DetailTables, and even though I set the detail table width to 100% there is still quite a big gap at the end of the detail grid.

Thanks
Paul
Top achievements
Rank 1
 answered on 26 Jun 2013
1 answer
107 views
Hello,

I want to implement that if you click one row,then you can edit, And you click another row, the row you just edited will update and the new row will go into edit mode.

I got some examples, but they just implement it as do one thing at one time.

Anyone can help me I really appreciate it.

Thank you.
Venelin
Telerik team
 answered on 26 Jun 2013
1 answer
123 views
Hello,

I have a web Application having some telerik controls.

i have following telerik Control :

telerik:RadWindowManager ID="RadWindowManager1" runat="server" Behavior="Close" VisibleStatusbar="false" VisibleTitlebar="true"
        InitialBehavior="None" ShowContentDuringLoad="false"  Modal="True" Overlay="True" 
        Behaviors="None" Height="640px" Width="900px" Skin="Telerik" EnableShadow="true" OnClientResizeEnd="SetWindowBehavior" >
        <Windows>
            <telerik:RadWindow ID="RadWindowTreeview" Title="Careplan Tree" runat="server" Modal="true"
                OnClientClose="OnClientClose" Behaviors="Close" BackColor="Transparent" DestroyOnClose="false"
                NavigateUrl="MainTreeContainer.aspx" BorderStyle="None" Visible="True" VisibleStatusbar="False"
                VisibleTitlebar="False" Width="900px" Height="640px" Animation="Fade" AutoSize="False"
                AnimationDuration="1000" Opacity="100">  </telerik:RadWindow>
            <telerik:RadWindow ID="RadWindow1" CssClass="defaultWindow" Width="900px" Height="640px" AutoSize="False"
                runat="server" Modal="true" Behaviors="None" Overlay="true" NavigateUrl="~/Terms.aspx"  OnClientClose="OnClientClose1" >
            </telerik:RadWindow>
 
             <telerik:RadWindow ID="RadWindow3"  CssClass="defaultWindow" MinWidth="900px" MinHeight="640px" AutoSize="False"
                runat="server" Modal="true" Behaviors="None" Overlay="true" NavigateUrl="~/Privacy.aspx"  OnClientClose="OnClientClose3" >
            </telerik:RadWindow>
 
        </Windows>
    </telerik:RadWindowManager>

i am opening an aspx form in RadWindowTreeview Radwindow .. i have overridden some telerik CSS like following:

.rwWindowContent, .rwExternalContent
        {
            border-style: groove !important;
            border-width: 1px;
            border-radius: 10px;
            background-image: url('background.jpg') !important;
            border-color: GhostWhite;
        }

but the background image doesn't display in IE8 only.. it displays well in Mozila, chrome,safari and IE9.. but not display only in IE8..

any suggestions ? thanks...

Marin Bratanov
Telerik team
 answered on 26 Jun 2013
1 answer
157 views
Hello...

I have a WebApplication having some telerik controls.

I have added RadWindow control in this web application and inside this radwindow i have added RadSplitter control as shown follows:

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Behavior="Close" VisibleStatusbar="false" VisibleTitlebar="true"
       InitialBehavior="None" ShowContentDuringLoad="false"  Modal="True" Overlay="True"
       Behaviors="None" Height="640px" Width="900px" Skin="Telerik" EnableShadow="true" OnClientResizeEnd="SetWindowBehavior" >
       <Windows>
           <telerik:RadWindow ID="RadWindowTreeview" Title="Careplan Tree" runat="server" Modal="true"
               OnClientClose="OnClientClose" Behaviors="Close" BackColor="Transparent" DestroyOnClose="false"
               NavigateUrl="MainTreeContainer.aspx" BorderStyle="None" Visible="True" VisibleStatusbar="False"
               VisibleTitlebar="False" Width="900px" Height="640px" Animation="Fade" AutoSize="false" 
               AnimationDuration="1000" Opacity="100" OnClientShow="OnclientShow"></telerik:RadWindow>
           <telerik:RadWindow ID="RadWindow1" CssClass="defaultWindow" Width="900px" Height="640px" AutoSize="False"
               runat="server" Modal="true" Behaviors="None" Overlay="true" NavigateUrl="~/Terms.aspx"  OnClientClose="OnClientClose1" >
           </telerik:RadWindow>
          
            <telerik:RadWindow ID="RadWindow3"  CssClass="defaultWindow" MinWidth="900px" MinHeight="640px" AutoSize="False"
               runat="server" Modal="true" Behaviors="None" Overlay="true" NavigateUrl="~/Privacy.aspx"  OnClientClose="OnClientClose3" >
           </telerik:RadWindow>
          
       </Windows>
   </telerik:RadWindowManager>

RadSplitter :
<telerik:RadSplitter ID="RadSplitter1" runat="server" Height="100%" Width="99.5%"  BorderSize="0" BorderStyle="None" SplitBarsSize="10px">
                   <telerik:RadPane ID="LeftPane" runat="server"  CssClass = "treeviewcontainer" Scrolling="None">                   
                       <uc:MainTreeview ID="MainTreeview" runat="server" treename="MainTree" masterView="true" viewMode="false" IsManualEntry="false" />
                   </telerik:RadPane>
                   <telerik:RadSplitBar ID="RadSplitBar1" runat="server" CollapseMode="Both">
                   </telerik:RadSplitBar>
                   <telerik:RadPane ID="RightPane" runat="server"  CssClass="treeviewcontainer" Scrolling="None">
                      <uc:MainTreeview ID="TemplateTreeview" runat="server" treename="TemplateTree" masterView="true" viewMode="false" IsManualEntry="false" />
                   </telerik:RadPane>
               </telerik:RadSplitter>


when i open this popup control it displays well in Mozila firefox , Safari , IE but it generate some design error in Chrome browser this design error exists until i click on Chrome Dev tool: after closing the Chrom dev tool the error disappear :  as shown in attached two images..

please check the attachment and give any suggestions:

when i apply autosize="True" in radwindow the problem doesn't arrives,.. but then in Mozila the radwindow size gets decrees and doesn't displays well

thanks




Marin Bratanov
Telerik team
 answered on 26 Jun 2013
2 answers
111 views
Hi,
      I would like to change the colour of the > icon on hierachical grids because it does not show when the colour of the grid line is white.
please can you help me to do this.

regards

Robert Smith
DJ
Top achievements
Rank 1
 answered on 26 Jun 2013
2 answers
127 views
Dear Telerik Team,

I want to add event on node click on treeview part of RadFileExplorer. I add it on page load in code behind
:
RadFileExplorer1.TreeView.OnClientNodeClicking = "RadTreeView1_NodeClick";

My test function is simple :

public void RadTreeView1_NodeClick(object o, RadTreeNodeEventArgs e)
{
     e.Node.Text = e.Node.Value;
}

When I click on node the request is send but it's abordted. In firebug I see "abordted" status for the request and after there has requests to infinity .

Regards,
Martial
PJ
Top achievements
Rank 1
 answered on 26 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?