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

I need to edit rows in ajax grid for multiple grids at the same time. We have more than one grid placed side by side which will have equal records and every row in grids are equivalent rows in other grids. What I want is that when I click edit button at any row in first grid then corresponding row in grids should become editable.

I am not getting an easy way to do that. Please help.

Thanks,
Sachi
Jayesh Goyani
Top achievements
Rank 2
 answered on 08 Jul 2013
8 answers
206 views
Dear Friends,

I have an issue since a couple of days. I have RadGrid1 which has Edit functionality by PopUp Edit Mode. Inside the Edit Form Template, I have another grid - RadGrid2. Everything is working fine except one thing - In RadGrid1 I have Client Settings with Client Event - OnRowClick. The problem here is that these client settings are also automatically applied to RadGrid2 when working in Edit mode

Could you please provide me some solution for that.

10x,
Alex
Andrey
Telerik team
 answered on 08 Jul 2013
7 answers
418 views
Hello,

I have been working on incorporating a radgrid with hierarchical data, among other controls, into an asp.net page.

I am declaring the structure of the grid programmatically in the code-behind and it has been working pretty well so far.

I am also using a master page, and have an ajaxscriptmanager on the masterpage, with a proxy on the content page.

What I would like to accomplish is have a textbox / input button which will rebind the grid via AJAX depending on what is typed into the textbox.

so far I have the following code.  it looks like the binding is working and is ajaxified correctly, but for some reason since I started using AJAX, the grid will not expand to be 100% height in its radpane.  I have tried to cut out as much code as possible to make it as bare-bones as a page as i can to find the issue, but I can't seem to find the culprit.  any help is appreciated!

The screenshot of the grid is attached.  the markup that i believe to be relevant is also pasted below:


<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="DataView.Master.cs" Inherits="plsProductionData.Site1" %>
 
<%@ Register Assembly="Infragistics35.Web.v10.3, Version=10.3.20103.1013, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.Web.UI.NavigationControls" TagPrefix="ig" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" tagprefix="ajaxToolkit"%>
 
<!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>
    <style type="text/css">
        html
        {
            overflow:hidden;
        }
        html,
        body,
        form
        {
            margin:0;
            height:100%;
            background-color:#f8f8f8;
        }
    </style>
    <style type="text/css">
        #gridAreaContent
        {   
            position: absolute;
            width: 100%;
        }       
    </style>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
 
</head>
<body>   
    <telerik:RadSkinManager ID="_radSkinMan" Runat="server" Skin="WebBlue">
    </telerik:RadSkinManager>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="_radScriptMan" 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 Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            </Scripts>
        </telerik:RadScriptManager>
        <telerik:RadAjaxManager ID="_radAjaxMan" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1" />
        <telerik:RadAjaxLoadingPanel
            ID="RadAjaxLoadingPanel1"
            runat="server"
            BackColor="White"
            Transparency="50"
            ScrollBars="None"
            Height="100%" />
    <telerik:RadSplitter ID="mainSplitter" runat="server" Height="100%" Width="100%" Orientation="Horizontal" >
        <telerik:RadPane ID="RadPane1" runat="server" CssClass="ApplyOverflow" Width="100%" Height="100px" Scrolling="None">
            <div style="width:100%;">
                <telerik:RadMenu ID="_mainMenu" runat="server" Width="100%" style="position:absolute; border-width: 0px;">
                </telerik:RadMenu>
            </div>
            <div style="width:100%;">
                <div style="width:300px; margin-top:20px; float:right;">
                    <asp:ContentPlaceHolder ID="loginArea" runat="server" />
                </div>
                <asp:ContentPlaceHolder ID="SearchArea" runat="server" />
            </div>
        </telerik:RadPane >
        <telerik:RadPane ID="RadPane2" runat="server" Width="100%" Height="100%" Scrolling="None" >
            <telerik:RadSplitter ID="RadSplitter2" runat="server" Height="100%" Width="100%" Orientation="Vertical" >
                <telerik:RadPane ID="RadPane3" runat="server" Height="100%" Scrolling="None">
                    <asp:ContentPlaceHolder ID="gridAreaContent" runat="server" />
                </telerik:RadPane>
                <telerik:RadSplitBar ID="Radsplitbar1" runat="server" CollapseMode="Backward" EnableResize="false"/>
                <telerik:RadPane ID="RadPane4" runat="server" Height="100%"  Width="320px" Scrolling="None">
                    <asp:ContentPlaceHolder ID="navPanel" runat="server" />
                </telerik:RadPane>
            </telerik:RadSplitter>
        </telerik:RadPane>
 
    </telerik:RadSplitter>
     
    </form>
</body>
</html>


Content Page:
<%@ Page Title="" Language="C#" MasterPageFile="~/DataView.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        #<%= _GridPanelClientID %>
        {
            margin:0;
            height:500px;
        }
 
        #_Grid_GridData 
        
           overflow-x:hidden !important; 
        }
         
        /*.bigModuleBottom td{padding:0}
        div.RadToolBar_Vista { float: none !important; }
        div.RadToolBar_Vista .rtbOuter { border: 0; } */
 
        div.RadToolBar .rtbUL {
            width: 100%;
        }
        div.SeparatedButtons .rtbItem {
            float: left;
        }          
  
        div.SeparatedButtons .rightAlignedWrapper {
            text-align:center;
            float: right !important;
        }
    </style>
    <telerik:RadCodeBlock id="RadCodeBlock1" runat="server">   
        <script type="text/javascript">
             
        </script>
    </telerik:RadCodeBlock>
</asp:Content>
 
 
 
 
<asp:Content ID="Content3" ContentPlaceHolderID="SearchArea" runat="server">
    <telerik:RadAjaxPanel ID="RadAjaxPanel12" runat="server">
        <div style="margin-left:20px; margin-top:33px; width:100%;">
        <img src="Images/Search/pls.jpg" alt="PLS" />
        <img src="Images/Search/researchandanalysis.jpg" alt="Research & Analysis" />
            <h1 style="font-size:18 pt; font-weight:bold; font-family:Tahoma; position:absolute; top:10px; left:150px;">PLS Production Data</h1>
            <div style="position:absolute; top:65px; left:150px;">
                <asp:TextBox ID="_searchText" runat="server" Width="322px" ></asp:TextBox>
                <telerik:RadButton ID="_searchButton" runat="server" Text="Search" OnClick="_searchButton_Click" />
                <%--<telerik:RadButton ID="_searchButton" runat="server" Text="Search" OnClientClicked="RefreshGrid" OnClick="_searchButton_Click" />--%>
            </div>
        </div>
    </telerik:RadAjaxPanel>
</asp:Content>
 
 
 
 
 
<asp:Content ID="Content2" ContentPlaceHolderID="gridAreaContent" runat="server">
    <telerik:RadAjaxManagerProxy ID="_radAjaxProxy" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="_GridContextMenu">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="_Grid" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="_GridContextMenu" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="_searchButton">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="_Grid" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
 
    <telerik:RadAjaxPanel ID="RadAjaxPanel5" runat="server">
        <telerik:RadGrid ID="_Grid"
                         runat="server"
                         Width="100%"
                         Height="100%"
                         style="border:0;"
                         AutoGenerateColumns="False"
                         GridLines="None" >
            <MasterTableView CommandItemDisplay="Top">
                <CommandItemTemplate>
                     
                </CommandItemTemplate>
            </MasterTableView>
            <ClientSettings>
                <ClientEvents OnRowSelected="RecordSelected"
                              OnRowDeselected="RecordSelected"
                              OnRowContextMenu="RowContextMenu"></ClientEvents>
            </ClientSettings>
        </telerik:RadGrid>
    </telerik:RadAjaxPanel>
</asp:Content>

I used to have the OnClientClicked function for the _searchButton control scripted to correctly bind the grid, but i thought the error was coming from there and apparently it wasnt, since now with it set how it is, I am still experiencing the same problem.

Please let me know if there is any other information that I can provide that will help.

Thanks.


Kostadin
Telerik team
 answered on 08 Jul 2013
1 answer
80 views

If I supply my own image for the TimePopupButton like so:

<TimePopupButton ImageUrl="~/Images/TimePopup16.png">

The image displays fine, but on hovering over the button, no image is displayed. I have to add the HoverImageUrl attribute as well. If not specified, the HoverImageUrl should use the same image.

Additionally, the image tag inserted when I supply my own image does not have the border="0" attributes or any border css applied, so it displays (in IE at least) the heavy blue border that images within anchor have by default. I had to add:

$( '.RadPicker .rcTable a>img' ).css( { 'border': '0px none transparent' } );

 
to my page initialization code to get rid of it.

 

 

 
Maria Ilieva
Telerik team
 answered on 08 Jul 2013
3 answers
521 views
I am trying to display a warning message saying your session is about to expire 2 min before the form authentication time out. It can be in  in radnotification or in radwindows. Please if anybody knows anything let me know.

Thanks for help.
Shinu
Top achievements
Rank 2
 answered on 08 Jul 2013
5 answers
291 views
Hi,
Please consider UI hierarchy below:

RadListView (ParentListView)

        ParentListView Child 1 RadGrid

        ParentListView Child 2RadGrid

        ParentListView Child 3 RadListView Sub (Sub ListView)

                 Sub ListView Child 1 RadGrid

                 Sub ListView Child 2 RadGrid

Every grid above supports Add and Edit item functionality and every grid has it's Need Data Source event.
The problem is whenever I Add new record in ParentListView Child 2RadGrid (using template) it get reflected in UI, however when I try to add new record in Sub ListView Child 2 RadGrid it opens template view, user can enter value in it and click on Save button however it doesn't show newly added record in UI (the datasource object has new record in it).

(No Declarative DataSource is used for any control).


Any help is appreciated.

Thanks,
Shekhar


Here is the code

<telerik:RadListView runat="server" ID="radListViewParent" ItemPlaceholderID="ParentPlaceHolder"
    Skin="Vista" Font-Bold="true" EnableViewState="true">
    <LayoutTemplate>
        <table cellpadding="0" cellspacing="0" width="99%">
            <tr>
                <td align="left">
                    <asp:PlaceHolder ID="ParentPlaceHolder" runat="server"></asp:PlaceHolder>
                </td>
            </tr>
            <tr style="height: 20px;">
                <td align="left">
                    <telerik:RadButton ID="btnAddNewItem" Text="Add New" CommandName="PerformInsert"
                        runat="server">
                    </telerik:RadButton>
                </td>
            </tr>
        </table>
    </LayoutTemplate>
    <ItemTemplate>
        <table cellpadding="0" cellspacing="0" width="99%">
            <tr>
                <td>
                    <asp:HiddenField runat="server" ID="hdnFldId" Value='<%# Bind("Id") %>' />
                    <asp:Label ID="Label1" runat="server">Heading</asp:Label>
                </td>
                <td>
                    <telerik:RadTextBox runat="server" ID="txtHeading" Text='<%# Bind("Text") %>'>
                    </telerik:RadTextBox>
                </td>
                <td>
                    <asp:ImageButton runat="server" ID="imgBtnDelete" AlternateText="Delete" CommandName="Delete"
                        CommandArgument='<%# Bind("Id") %>' OnClientClick="return CofirmHeadingDelete()"
                        ImageUrl="~/App_Themes/Theme1/images/delete_small_btn.gif" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label2" runat="server">Text</asp:Label>
                </td>
                <td colspan="2">
                    <telerik:RadEditor runat="server" ID="radHeadingText" Height="200" Width="500" AutoResizeHeight="false"
                        Content='<%# Bind("TextDiscription") %>'>
                        <Tools>
                            <telerik:EditorToolGroup>
                                <telerik:EditorTool Name="Bold" Text="Bold" />
                                <telerik:EditorTool Name="Italic" Text="Italic" />
                                <telerik:EditorTool Name="Underline" Text="Underline" />
                                <telerik:EditorTool Name="InsertLink" Text="Insert Link Dialog" />
                                <telerik:EditorTool Name="Unlink" />
                            </telerik:EditorToolGroup>
                        </Tools>
                    </telerik:RadEditor>
                </td>
            </tr>
            <!--ParentListView Child 1 RadGrid  -->
            <tr>
                <td>
                </td>
                <td colspan="2">
                    <fieldset style="width: 100%;">
                        <legend style="font-weight: bold; font-size: larger; color: Black;">Ref Doc</legend>
                        <telerik:RadGrid runat="server" ID="ParentListViewChild1RadGrid" AutoGenerateColumns="false"
                            AllowSorting="false" AllowAutomaticUpdates="true" AllowAutomaticInserts="true"
                            Skin="Web20" OnItemDataBound="ParentListViewChild1RadGrid_ItemDataBound" OnItemCommand="ParentListViewChild1RadGrid_ItemCommand"
                            OnItemCreated="ParentListViewChild1RadGrid_ItemCreated" OnNeedDataSource="ParentListViewChild1RadGrid_NeedDataSource">
                            <MasterTableView DataKeyNames="Id" CommandItemDisplay="Bottom" Width="100%" InsertItemDisplay="Bottom">
                                <Columns>
                                    <telerik:GridTemplateColumn ReadOnly="true">
                                        <ItemTemplate>
                                            <asp:Image ID="imgFiletypeIcon" runat="server" />
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridBoundColumn DataField="Description" HeaderText="Description">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="CustomFileName" HeaderText="CustomFileName" ReadOnly="true"
                                        Display="false">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridAttachmentColumn MaxFileSize="1048576" EditFormHeaderTextFormat="Upload File:"
                                        AttachmentDataField="BinaryData" DataTextField="CustomFileName" UniqueName="AttachmentColumn">
                                    </telerik:GridAttachmentColumn>
                                    <telerik:GridEditCommandColumn HeaderStyle-Width="30px" EditImageUrl="../../../App_Themes/Theme1/images/update_small_btn.png"
                                        ButtonType="ImageButton">
                                    </telerik:GridEditCommandColumn>
                                    <telerik:GridTemplateColumn>
                                        <ItemTemplate>
                                            <asp:ImageButton AlternateText="Delete" runat="server" ID="imgBtnEnrollDeleteRefDoc"
                                                CommandName="Delete" ImageUrl="~/App_Themes/Theme1/images/delete_btn.png" CommandArgument='<%# Eval("ArtifactId") %>'
                                                OnClientClick="return confirm('Are you sure you want to delete this record?');" />
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                </Columns>
                                <CommandItemSettings ShowRefreshButton="false" AddNewRecordText="" AddNewRecordImageUrl="../../../App_Themes/Theme1/images/add_small_btn.gif" />
                                <EditFormSettings EditColumn-ButtonType="ImageButton" FormTableStyle-CellSpacing="5"
                                    EditColumn-UpdateImageUrl="../../../App_Themes/Theme1/images/add_small_btn.gif"
                                    EditColumn-CancelImageUrl="../../../App_Themes/Theme1/images/cancel_small_btn.gif"
                                    EditColumn-UpdateText="Add" EditColumn-CancelText="Cancel">
                                    <FormTableStyle CellSpacing="5" />
                                    <FormMainTableStyle CellPadding="5" CellSpacing="5" />
                                </EditFormSettings>
                                <NoRecordsTemplate>
                                    No records found.
                                </NoRecordsTemplate>
                            </MasterTableView>
                            <ClientSettings>
                                <ClientEvents OnCommand="gridCommand"></ClientEvents>
                            </ClientSettings>
                        </telerik:RadGrid>
                    </fieldset>
                </td>
            </tr>
            <!-- ParentListView Child 2RadGrid -->
            <tr>
                <td>
                </td>
                <td colspan="2">
                    <fieldset style="width: 100%;">
                        <legend style="font-weight: bold; font-size: larger; color: Black;">URL</legend>
                        <telerik:RadGrid runat="server" ID="ParentListViewChild2RadGrid" AutoGenerateColumns="false"
                            AllowSorting="false" Skin="Web20" Width="100%" OnItemCommand="ParentListViewChild2RadGrid_ItemCommand"
                            OnNeedDataSource="ParentListViewChild2RadGrid_NeedDataSource" OnItemDataBound="ParentListViewChild2RadGrid_ItemDataBound">
                            <MasterTableView DataKeyNames="HeadingId" CommandItemDisplay="Bottom" Width="100%"
                                ShowHeadersWhenNoRecords="true">
                                <Columns>
                                    <telerik:GridBoundColumn UniqueName="Url" DataField="Url" HeaderText="Url" ItemStyle-Width="100px">
                                        <ItemStyle Wrap="true" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="Name" DataField="Name" HeaderText="Name" ItemStyle-Width="100px">
                                        <ItemStyle Wrap="true" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridEditCommandColumn HeaderText="" HeaderStyle-Width="30px" ButtonType="ImageButton"
                                        EditImageUrl="../../../App_Themes/Theme1/images/update_small_btn.png">
                                    </telerik:GridEditCommandColumn>
                                    <telerik:GridButtonColumn ConfirmDialogType="Classic" ConfirmTitle="Confirm Delete"
                                        DataTextField="" UniqueName="Delete" HeaderStyle-Width="30px" ConfirmText="Are you sure you want to delete this record?"
                                        ButtonType="ImageButton" ImageUrl="~/App_Themes/Theme1/images/delete_btn.png"
                                        Text="Delete" CommandArgument="" CommandName="Delete">
                                    </telerik:GridButtonColumn>
                                </Columns>
                                <CommandItemSettings ShowRefreshButton="false" AddNewRecordText="" AddNewRecordImageUrl="../../../App_Themes/Theme1/images/add_small_btn.gif" />
                                <EditFormSettings>
                                    <FormTableItemStyle Wrap="true"></FormTableItemStyle>
                                    <EditColumn ButtonType="ImageButton" UpdateImageUrl="../../../App_Themes/Theme1/images/update_small_btn.png"
                                        InsertImageUrl="../../../App_Themes/Theme1/images/add_small_btn.gif" UniqueName="EditCommandColumn1"
                                        CancelImageUrl="../../../App_Themes/Theme1/images/cancel_small_btn.gif" CancelText="">
                                    </EditColumn>
                                    <FormTableButtonRowStyle HorizontalAlign="Right"></FormTableButtonRowStyle>
                                </EditFormSettings>
                                <NoRecordsTemplate>
                                    No records found.
                                </NoRecordsTemplate>
                            </MasterTableView>
                        </telerik:RadGrid>
                    </fieldset>
                </td>
            </tr>
            <!-- ParentListView Child 3 RadListView Sub (Sub ListView)-->
            <tr>
                <td colspan="3">
                    <telerik:RadListView runat="server" ID="ParentListViewChild3RadListViewSub" ItemPlaceholderID="SubListPlaceHolder"
                        Skin="Vista" Font-Bold="true" OnItemDataBound="ParentListViewChild3RadListViewSub_ItemDataBound"
                        OnItemCommand="ParentListViewChild3RadListViewSub_ItemCommand" EnableViewState="true"
                        DataSource='<%# Eval("SubHeadingsList") %>'>
                        <LayoutTemplate>
                            <fieldset style="width: 100%; background-color: #f3f3f3;">
                                <legend style="font-weight: bold; font-size: larger; color: Black;">Sub Headings</legend>
                                <table cellpadding="0" cellspacing="0" width="98%">
                                    <tr>
                                        <td>
                                            <asp:PlaceHolder ID="SubListPlaceHolder" runat="server"></asp:PlaceHolder>
                                        </td>
                                    </tr>
                                    <tr style="height: 20px;">
                                        <td align="right">
                                            <telerik:RadButton ID="btnAddNewSubListItem" Text="Add New Sub Item" runat="server"
                                                CommandName="PerformInsert" CommandArgument='<%# Bind("HeadingId") %>'>
                                            </telerik:RadButton>
                                        </td>
                                    </tr>
                                </table>
                            </fieldset>
                        </LayoutTemplate>
                        <ItemTemplate>
                            <table cellpadding="0" cellspacing="0" width="98%">
                                <tr>
                                    <td>
                                        <telerik:RadTextBox runat="server" ID="txtHeading" Text='<%# Bind("Text") %>'>
                                        </telerik:RadTextBox>
                                    </td>
                                    <td>
                                        <asp:ImageButton ID="imgBtnSubLisItemDelete" runat="server" AlternateText="Delete"
                                            CommandName="Delete" CommandArgument='<%# Bind("HeadingId") %>' OnClientClick="return CofirmSubHeadingDelete()"
                                            ImageUrl="~/App_Themes/Theme1/images/delete_small_btn.gif" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="Label4" runat="server">Text</asp:Label>
                                    </td>
                                    <td colspan="2">
                                        <telerik:RadEditor runat="server" ID="radEditorSubListItemText" Height="200" Width="500"
                                            AutoResizeHeight="false" Content='<%# Bind("TextDiscription") %>'>
                                            <Tools>
                                                <telerik:EditorToolGroup>
                                                    <telerik:EditorTool Name="Bold" Text="Bold" />
                                                    <telerik:EditorTool Name="Italic" Text="Italic" />
                                                    <telerik:EditorTool Name="Underline" Text="Underline" />
                                                    <telerik:EditorTool Name="InsertLink" Text="Insert Link Dialog" />
                                                    <telerik:EditorTool Name="Unlink" />
                                                </telerik:EditorToolGroup>
                                            </Tools>
                                        </telerik:RadEditor>
                                    </td>
                                </tr>
                                <!--Grid Subheading Ref Doc-->
                                <tr>
                                    <td>
                                    </td>
                                    <td colspan="2">
                                        <fieldset style="width: 100%">
                                            <legend style="font-weight: bold; font-size: larger; color: Black;">Ref Doc</legend>
                                            <telerik:RadGrid runat="server" ID="SubListViewChild1RadGrid" AutoGenerateColumns="false"
                                                AllowSorting="false" AllowAutomaticUpdates="true" AllowAutomaticInserts="true"
                                                Skin="Web20" OnItemCommand="SubListViewChild1RadGrid_ItemCommand" OnItemDataBound="SubListViewChild1RadGrid_ItemDataBound"
                                                OnNeedDataSource="SubListViewChild1RadGrid_OnNeedDataSource">
                                                <MasterTableView DataKeyNames="ArtifactId" CommandItemDisplay="Bottom" Width="90%">
                                                    <Columns>
                                                        <telerik:GridBoundColumn DataField="IsFileUploaded" HeaderText="ID" ReadOnly="true"
                                                            Display="false">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridTemplateColumn ReadOnly="true">
                                                            <ItemTemplate>
                                                                <asp:Image ID="imgFiletypeIcon" runat="server" />
                                                            </ItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                                        <telerik:GridBoundColumn DataField="Description" HeaderText="Description">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="CustomFileName" ReadOnly="true" HeaderText="CustomFileName"
                                                            Display="false">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridAttachmentColumn MaxFileSize="1048576" EditFormHeaderTextFormat="Upload File:"
                                                            HeaderText="File" AttachmentDataField="BinaryData" DataTextField="CustomFileName"
                                                            UniqueName="AttachmentColumn">
                                                        </telerik:GridAttachmentColumn>
                                                        <telerik:GridEditCommandColumn HeaderStyle-Width="30px" ButtonType="ImageButton"
                                                            EditImageUrl="../../../App_Themes/Theme1/images/update_small_btn.png">
                                                        </telerik:GridEditCommandColumn>
                                                        <telerik:GridTemplateColumn>
                                                            <ItemTemplate>
                                                                <asp:ImageButton AlternateText="Delete" runat="server" ID="imgSubHeadBtnDeleteRefDoc"
                                                                    CommandName="Delete" ImageUrl="~/App_Themes/Theme1/images/delete_btn.png" CommandArgument='<%# Eval("ArtifactId") %>'
                                                                    OnClientClick="return confirm('Are you sure you want to delete this record?');" />
                                                            </ItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                                    </Columns>
                                                    <CommandItemSettings ShowRefreshButton="false" AddNewRecordText="" AddNewRecordImageUrl="../../../App_Themes/Theme1/images/add_small_btn.gif" />
                                                    <EditFormSettings EditColumn-ButtonType="ImageButton" FormTableStyle-CellSpacing="5"
                                                        EditColumn-UpdateImageUrl="../../../App_Themes/Theme1/images/add_small_btn.gif"
                                                        EditColumn-CancelImageUrl="../../../App_Themes/Theme1/images/cancel_small_btn.gif"
                                                        EditColumn-UpdateText="Save" EditColumn-CancelText="Cancel">
                                                        <EditColumn UniqueName="EditCommandColumn">
                                                        </EditColumn>
                                                        <FormTableStyle CellSpacing="5" />
                                                        <FormMainTableStyle CellPadding="5" CellSpacing="5" />
                                                    </EditFormSettings>
                                                    <NoRecordsTemplate>
                                                        No records found.
                                                    </NoRecordsTemplate>
                                                </MasterTableView>
                                                <ClientSettings>
                                                    <ClientEvents OnCommand="gridCommand"></ClientEvents>
                                                </ClientSettings>
                                            </telerik:RadGrid>
                                        </fieldset>
                                    </td>
                                </tr>
                                <!--Sub ListView Child 2 RadGrid -->
                                <tr>
                                    <td>
                                    </td>
                                    <td colspan="2">
                                        <fieldset style="width: 100%">
                                            <legend style="font-weight: bold; font-size: larger; color: Black;">URL</legend>
                                            <telerik:RadGrid runat="server" ID="SubListViewChild2RadGrid" AutoGenerateColumns="false"
                                                AllowSorting="false" Skin="Web20" Width="100%" OnNeedDataSource="SubListViewChild2RadGrid_NeedDataSource"
                                                OnItemCommand="SubListViewChild2RadGrid_ItemCommand" OnItemDataBound="SubListViewChild2RadGrid_ItemDataBound">
                                                <MasterTableView DataKeyNames="ArtifactId" CommandItemDisplay="Bottom" Width="100%">
                                                    <Columns>
                                                        <telerik:GridBoundColumn DataField="Url" HeaderText="Url" ItemStyle-Width="100px">
                                                            <ItemStyle Wrap="true" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="Name" HeaderText="Name" ItemStyle-Width="100px">
                                                            <ItemStyle Wrap="true" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridEditCommandColumn HeaderText="" HeaderStyle-Width="30px" ButtonType="ImageButton"
                                                            EditImageUrl="../../../App_Themes/Theme1/images/update_small_btn.png">
                                                        </telerik:GridEditCommandColumn>
                                                        <telerik:GridButtonColumn ConfirmDialogType="Classic" ConfirmTitle="Confirm Delete"
                                                            DataTextField="" UniqueName="Delete" HeaderStyle-Width="30px" ConfirmText="Are you sure you want to delete this record?"
                                                            ButtonType="ImageButton" ImageUrl="~/App_Themes/Theme1/images/delete_btn.png"
                                                            Text="Delete" CommandArgument="" CommandName="Delete">
                                                        </telerik:GridButtonColumn>
                                                    </Columns>
                                                    <CommandItemSettings ShowRefreshButton="false" AddNewRecordText="" AddNewRecordImageUrl="../../../App_Themes/Theme1/images/add_small_btn.gif" />
                                                    <EditFormSettings>
                                                        <FormTableItemStyle Wrap="true"></FormTableItemStyle>
                                                        <EditColumn UpdateText="" UpdateImageUrl="../../../App_Themes/Theme1/images/update_small_btn.png"
                                                            InsertText="" InsertImageUrl="../../../App_Themes/Theme1/images/add_small_btn.gif"
                                                            ButtonType="ImageButton" UniqueName="EditCommandColumn1" CancelImageUrl="../../../App_Themes/Theme1/images/cancel_small_btn.gif"
                                                            CancelText="">
                                                        </EditColumn>
                                                        <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
                                                    </EditFormSettings>
                                                    <NoRecordsTemplate>
                                                        No records found.
                                                    </NoRecordsTemplate>
                                                </MasterTableView>
                                            </telerik:RadGrid>
                                        </fieldset>
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                        <ItemSeparatorTemplate>
                            <table>
                                <tr style="height: 20px;">
                                </tr>
                            </table>
                        </ItemSeparatorTemplate>
                    </telerik:RadListView>
                </td>
            </tr>
        </table>
    </ItemTemplate>
    <ItemSeparatorTemplate>
        <table>
            <tr style="height: 20px;">
            </tr>
        </table>
    </ItemSeparatorTemplate>
</telerik:RadListView>

 

 

Eyup
Telerik team
 answered on 08 Jul 2013
1 answer
68 views
I have a RadTimeView with TimeFormat="h:mm tt" and I cannot get the times in the popup to align right. I have added HorizontalAlign=Right" and TimeStyle-HorizontalAlign="Right" and the times are still centered. Looking at the generated html, it appears that the problem is because the anchor elements in the table cells (the table cells DO have align="right" on them) are getting the css attributes display:block and text-align:center applied (from .RadCalendarTimeView style). Since the anchor elements display as block, they are taking the full width of the table cell, so the center align attribute is overriding the cell attribute. When HorizontalAlign="Right" is specified, it should be applied to the a element as well.

v2012.3.1308.40
Eyup
Telerik team
 answered on 08 Jul 2013
1 answer
47 views
Hi. 'm Exporting PDF file using RadGrid. I want, exported pdf file has to be shown Page Number on each page footer in Center.
'm using Telerik 2011 Release ver 5:1:11:928.

Please help me in this.
Thanks in advance.
Kostadin
Telerik team
 answered on 08 Jul 2013
9 answers
177 views

Hi developers,

I'm using a List of objects to fill my Grid. The objects type is a class that inherits from another class. My grid shows the fields correctly, but if I try sort, I get some strange errors. When I try to sort by a field from the base class, I get an error (Cannot find the column '...'). If I try sort by a field from the child class (used as DataSource), the Grid is sorted correctly.

My Telerik version is Q3 2008.

Following, I try to exemplify the situation.

My classes:

public class ClassA  
{  
   public string ID { getset; }  
   public string Name { getset; }  
}  
 
public class ClassB : ClassA  
{  
   public string ZipCode { getset; }  

My Page:

radGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e)  
{  
    List<ClassB> list = getData();  
    radGrid.DataSource = list;  

If I try to sort by ZipCode, the Grid is sorted.
If I try to sort by Name or ID, I get the error "Cannot find column".
Andrey
Telerik team
 answered on 08 Jul 2013
1 answer
277 views
Hi,

I have email ( compose screen ) is showing in the radwindow as popup. If user clicks on close button accidentally then I would like to show radconfirm.

Now I can able to show radconfirm ( "Do you want to save as draft ") , But 2 things i have to do.
1) Have check validation before save.
2) If user clicks on "OK" then i would like to save as draft.

In Parent :

<telerik:RadWindowManager runat="Server" ID="RadWindowManager2" ShowContentDuringLoad="false"
    EnableViewState="false">
    <Windows>
        <telerik:RadWindow runat="server" ID="EmailScreen" KeepInScreenBounds="true" Title="TWDM Email"
            OnClientBeforeClose="OnClientBeforeCloseEmailScreen" InitialBehaviors="Maximize"
            AutoSize="true" Width="1000px" Height="850px" ReloadOnShow="true" ShowContentDuringLoad="false"
            Modal="True" Behaviors="Close,Move,Resize,Maximize" VisibleStatusbar="true">
        </telerik:RadWindow>
    </Windows>  
</telerik:RadWindowManager>
 
  function OnClientBeforeCloseEmailScreen(sender, eventArgs) {
            radconfirm('Do you want to save as draft?', confirmCallbackFn1, 400, 200, null, 'TWDM Confirm');
        }
 
        function confirmCallbackFn1(arg) {
            if (arg) //the user clicked OK
            {
                __doPostBack("<%=hdnBtnSaveAsDraft.UniqueID %>", "");
            }
        }
 
 
' Showing email compose screen in Radwindow Popup here.
 function onButtonClicked(sender, args) {
            var commandName = args.get_item().get_commandName();
            var qs = getQueryStrings();
            var oManager = GetRadWindowManager().getWindowByName("EmailScreen");
           if (commandName == "Compose") {
                window.radopen("ComposeMail.aspx?type=NewEmail&TaskNo=" + qs["TaskNo"] + "&Parent=" + qs["Parent"] + "", "EmailScreen");
              
        }


Find the attachment and Please help me on this..





Ivaylo
Telerik team
 answered on 08 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?