Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
248 views
Hi Greetings,

We have a Rad Grid with Update and Cancel button as part of the first column, during the first post back this column along with the footer of the grid is not displayed. However in the subsequent postback the same column along with the footer is displayed. I have attached the image of the grid before and after the first post back for reference. Also i have pasted the code of the form below:

<asp:Content ID="Content1" ContentPlaceHolderID="cphCMS" runat="server">
    <link href="../StyleSheets/CMS4.0StyleSheet.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript">
        var isHelpPopup = false;
        function openwindow() {
            isHelpPopup = true;
            window.open("../MaintenanceScreens/HelpPopup.aspx?FormName=" + "FMEAv2.aspx", "_blank", "toolbar=no, scrollbars=no, resizable=no, Right=0, width=735px, height=615px");
        }
    </script>
    <style type="text/css">
        #txtRelevantrisk_Edit .reLayoutWrapper, .reWrapper_corner, .reWrapper_center, .reLeftVerticalSide, .reRightVerticalSide, .reTlbVertical, .reToolCell, .reContentCell, .reToolZone, .reBottomTable, .reEditorModesCell, .reBottomZone, .reResizeCell
        {
            border: 0 none !important;
            padding: 0 !important;
        }
        #txtRelevantrisk_Edit .Telerik.reWrapper, .Telerik.RadEditor .reContentCell, .Telerik.reColorPicker, .Telerik.reInsertTable, .Telerik.reCustomLinks a:hover
        {
            border: 1px solid #828282 !important;
        }
        #txtRelevantrisk_Edit .reLeftVerticalSide, .reRightVerticalSide
        {
            padding: 2px !important;
        }
    </style>
    <table width="98%" cellpadding="0" cellspacing="0" border="0" style="padding-left: 10px">
        <tr style="vertical-align: top;">
            <td class="label" style="width: 10%; padding-left: 10px">
                FMEA
            </td>
            <td align="center">
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <asp:Label ID="lblMessage" CssClass="gridlabel" runat="server"></asp:Label></ContentTemplate>
                </asp:UpdatePanel>
            </td>
            <td align="right" style="width: 10%; padding-right: 20px">
                <asp:Button ID="btnSave" Visible="false" runat="server" Text="Save" ValidationGroup="Save"
                    CausesValidation="true" OnClick="btnSave_Click" />
            </td>
        </tr>
        <tr>
            <td style="padding-left: 10px">
                <asp:ImageButton ID="imgHelp" ImageUrl="~/Images/Help.png" runat="server" OnClientClick="openwindow(); return false;" />
            </td>
            <td align="right" valign="top" style="padding-right: 10px" colspan="2">
                <span id="spnAsterik" runat="server" style="color: Red;">*</span><em> </em><span
                    id="spnCurrentIsrequired" runat="server" style="padding-right: 10px"><em>indicates required</em></span>
            </td>
        </tr>
        <tr>
            <td>
                <br />
            </td>
        </tr>
        <tr>
            <td align="left" valign="top" class="label" colspan="3">
                FMEA <span id="spnCurrentIsControlPlan" class="label" runat="server" style="color: Red;">
                    *</span>
            </td>
        </tr>
        <tr>
            <td colspan="3">
                <telerik:radajaxmanager id="radManagerFMEAv2" runat="server">
                </telerik:radajaxmanager>
                <telerik:radajaxmanagerproxy id="RadAjaxManagerFMEAv2" runat="server">
                    <ajaxsettings>
                        <telerik:AjaxSetting AjaxControlID="grdFMEAv2">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="grdFMEAv2" UpdatePanelRenderMode="Inline"
                                    LoadingPanelID="ra1grdRAQ" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                    </ajaxsettings>
                </telerik:radajaxmanagerproxy>
                <telerik:radgrid id="grdFMEAv2" runat="server" autogeneratecolumns="false" onneeddatasource="grdFMEA_NeedDataSource"
                    onitemdatabound="grdFMEA_OnItemDataBound" oninsertcommand="grdFMEA_InsertCommand"
                    ondeletecommand="grdFMEA_DeleteCommand" onitemcommand="grdFMEA_ItemCommand" onitemcreated="grdFMEA_ItemCreated"
                    width="98%" allowpaging="true" pagerstyle-alwaysvisible="true" allowsorting="true" >
                    <mastertableview commanditemdisplay="Bottom" editmode="InPlace" allowsorting="true"
                        datakeynames="CMSFMEAID">
                        <Columns>
                            <telerik:GridEditCommandColumn UniqueName="Edit" UpdateText="Update" ButtonType="ImageButton"
                                CancelImageUrl="../Images/Cancel.gif" InsertImageUrl="../Images/Update.gif" UpdateImageUrl="../Images/Update.gif"
                                EditImageUrl="../Images/Edit.gif">
                                <ItemStyle HorizontalAlign="center" Width="5%"></ItemStyle>
                            </telerik:GridEditCommandColumn>
                            <telerik:GridTemplateColumn HeaderText="FMEA Type" UniqueName="FMEAType" DataField="FMEAType"
                                SortExpression="FMEAType" HeaderStyle-Width="12%" HeaderStyle-HorizontalAlign="Left">
                                <ItemTemplate>
                                    <asp:Label runat="server" ID="lblFMEAType" CssClass="gridlabel" Text='<%#Eval("FMEAType")%>'></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadComboBox ID="rcbFMEATypeEdit" runat="server" DataTextField="FMEAType"
                                        Width="80px" AutoPostBack="true" OnSelectedIndexChanged="rcbFMEATypeEdit_SelectedIndexChanged"
                                        CssClass="normalDropDownList" Skin="Web20" MarkFirstMatch="true">
                                        <Items>
                                            <telerik:RadComboBoxItem runat="server" Text="" Value="" />
                                            <telerik:RadComboBoxItem runat="server" Text="DFMEA" Value="1" />
                                            <telerik:RadComboBoxItem runat="server" Text="PFMEA" Value="2" />
                                            <telerik:RadComboBoxItem runat="server" Text="No FMEA" Value="3" />
                                        </Items>
                                    </telerik:RadComboBox>
                                    <asp:RequiredFieldValidator ID="rfvFMEAType" runat="server" ControlToValidate="rcbFMEATypeEdit"
                                       Display="None" SetFocusOnError="true" ErrorMessage="Please select FMEA Type"
                                       ></asp:RequiredFieldValidator>
                                    <ajaxToolkit:ValidatorCalloutExtender ID="vceFMEAType" runat="server" TargetControlID="rfvFMEAType"
                                    CssClass="AjaxValidatorCalloutExtender">
                                    </ajaxToolkit:ValidatorCalloutExtender>
                                </EditItemTemplate>
                                <ItemStyle HorizontalAlign="Left" Width="12%" VerticalAlign="Top"></ItemStyle>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="FMEA Name" ItemStyle-HorizontalAlign="Left"
                                SortExpression="FMEAName" HeaderStyle-Width="12%">
                                <ItemTemplate>
                                    <asp:Label runat="server" ID="lblFMEAName" CssClass="gridlabel" Text='<%#Eval("FMEAName")%>'></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadComboBox ID="rcbFMEANameEdit" runat="server" DataTextField="FMEAName"
                                        Width="80px" AutoPostBack="true" OnSelectedIndexChanged="rcbFMEANameEdit_SelectedIndexChanged"
                                        CssClass="normalDropDownList" Skin="Web20" MarkFirstMatch="true">
                                    </telerik:RadComboBox>
                                    <asp:RequiredFieldValidator ID="rfvFMEANameEdit" runat="server" ControlToValidate="rcbFMEANameEdit"
                                        ErrorMessage="Please select FMEA Name" Display="None" InitialValue=""></asp:RequiredFieldValidator>
                                    <ajaxToolkit:ValidatorCalloutExtender ID="vceFMEAName" runat="server" TargetControlID="rfvFMEANameEdit"
                                    CssClass="AjaxValidatorCalloutExtender">
                                    </ajaxToolkit:ValidatorCalloutExtender>
                                </EditItemTemplate>
                                <ItemStyle HorizontalAlign="Left" Width="10%" VerticalAlign="Top"></ItemStyle>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="FMEA Owner" DataField="FMEA Owner" ItemStyle-HorizontalAlign="Left"
                                SortExpression="FMEAOwnerName" HeaderStyle-Width="12%">
                                <ItemTemplate>
                                    <asp:Label ID="lblFMEAOwner" runat="server" CssClass="gridlabel" Text='<%#Eval("FMEAOwnerName")%>'></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:Label ID="lblFMEAOwnerEdit" runat="server" CssClass="gridlabel" Text='<%#Eval("FMEAOwnerName")%>'></asp:Label>
                                </EditItemTemplate>
                                <ItemStyle HorizontalAlign="Left" Width="10%" VerticalAlign="Top"></ItemStyle>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="Relevant Risk(s)" DataField="Relevant Risk(s)"
                                ItemStyle-HorizontalAlign="Left" SortExpression="RelevantRisk" HeaderStyle-Width="20%">
                                <ItemTemplate>
                                    <div id="txtRelevantrisk" runat="server">
                                        <%#Eval("RelevantRisk")%>
                                    </div>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadEditor ID="txtRelevantrisk_Edit" runat="server" Font-Names="Arial" Font-Size="10pt"
                                        Content='<%#Eval("RelevantRisk")%>' EditModes="Design" Height="200px" Width="280px" 
                                        ContentFilters="IndentHTMLContent">
                                        <CssFiles>
                                            <telerik:EditorCssFile Value="~/EditorContentArea.css" />
                                        </CssFiles>
                                        <RealFontSizes>
                                            <telerik:EditorRealFontSize Value="8pt" />
                                            <telerik:EditorRealFontSize Value="9pt" />
                                            <telerik:EditorRealFontSize Value="10pt" />
                                            <telerik:EditorRealFontSize Value="11pt" />
                                            <telerik:EditorRealFontSize Value="12pt" />
                                            <telerik:EditorRealFontSize Value="14pt" />
                                            <telerik:EditorRealFontSize Value="16pt" />
                                            <telerik:EditorRealFontSize Value="18pt" />
                                            <telerik:EditorRealFontSize Value="20pt" />
                                            <telerik:EditorRealFontSize Value="22pt" />
                                            <telerik:EditorRealFontSize Value="24pt" />
                                            <telerik:EditorRealFontSize Value="26pt" />
                                            <telerik:EditorRealFontSize Value="28pt" />
                                            <telerik:EditorRealFontSize Value="32pt" />
                                            <telerik:EditorRealFontSize Value="36pt" />
                                            <telerik:EditorRealFontSize Value="48pt" />
                                            <telerik:EditorRealFontSize Value="72pt" />
                                        </RealFontSizes>
                                        <Tools>
                                            <telerik:EditorToolGroup>
                                                <telerik:EditorTool Name="Copy" />
                                                <telerik:EditorTool Name="Paste" />
                                                <telerik:EditorTool Name="Bold" />
                                                <telerik:EditorTool Name="FontName" Text="Calibri" />
                                                <telerik:EditorTool Name="RealFontSize" Text="12pt" />
                                                <telerik:EditorTool Name="InsertOrderedList" />
                                                <telerik:EditorTool Name="InsertUnorderedList" />
                                            </telerik:EditorToolGroup>
                                        </Tools>
                                        <FontNames>
                                            <telerik:EditorFont Value="Arial" />
                                            <telerik:EditorFont Value="Arial Black" />
                                            <telerik:EditorFont Value="Arial Narrow" />
                                            <telerik:EditorFont Value="Calibri" />
                                            <telerik:EditorFont Value="Comic Sans MS" />
                                            <telerik:EditorFont Value="Courier New" />
                                            <telerik:EditorFont Value="Georgia" />
                                            <telerik:EditorFont Value="Lucida Console" />
                                            <telerik:EditorFont Value="sans-serif" />
                                            <telerik:EditorFont Value="Tahoma" />
                                            <telerik:EditorFont Value="Times New Roman" />
                                            <telerik:EditorFont Value="Verdana" />
                                        </FontNames>
                                        <Content></Content>
                                    </telerik:RadEditor>
                                    <asp:RequiredFieldValidator ID="rfvRelevantrisk_Edit" runat="server" ControlToValidate="txtRelevantrisk_Edit"
                                        ErrorMessage="Please Enter Relevant Risk(s)" Display="None" InitialValue=""></asp:RequiredFieldValidator>
                                    <ajaxToolkit:ValidatorCalloutExtender ID="vceRelevantrisk" runat="server" TargetControlID="rfvRelevantrisk_Edit"
                                    CssClass="AjaxValidatorCalloutExtender">
                                    </ajaxToolkit:ValidatorCalloutExtender>
                                </EditItemTemplate>
                                <ItemStyle HorizontalAlign="Left" Width="20%" VerticalAlign="Top"></ItemStyle>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="Mitigation Item(s)" DataField="Mitigation Item(s)"
                                ItemStyle-HorizontalAlign="Left" SortExpression="MitigationAction" HeaderStyle-Width="20%">
                                <ItemTemplate>
                                    <div id="txtMT" runat="server">
                                        <%#Eval("MitigationAction")%>
                                    </div>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadEditor ID="txtMTEdit" runat="server" Font-Names="Arial" Font-Size="10pt"
                                        Content='<%#Eval("MitigationAction")%>' EditModes="Design" Height="200px" Width="280px"
                                        ContentFilters="IndentHTMLContent">
                                        <CssFiles>
                                            <telerik:EditorCssFile Value="~/EditorContentArea.css" />
                                        </CssFiles>
                                        <RealFontSizes>
                                            <telerik:EditorRealFontSize Value="8pt" />
                                            <telerik:EditorRealFontSize Value="9pt" />
                                            <telerik:EditorRealFontSize Value="10pt" />
                                            <telerik:EditorRealFontSize Value="11pt" />
                                            <telerik:EditorRealFontSize Value="12pt" />
                                            <telerik:EditorRealFontSize Value="14pt" />
                                            <telerik:EditorRealFontSize Value="16pt" />
                                            <telerik:EditorRealFontSize Value="18pt" />
                                            <telerik:EditorRealFontSize Value="20pt" />
                                            <telerik:EditorRealFontSize Value="22pt" />
                                            <telerik:EditorRealFontSize Value="24pt" />
                                            <telerik:EditorRealFontSize Value="26pt" />
                                            <telerik:EditorRealFontSize Value="28pt" />
                                            <telerik:EditorRealFontSize Value="32pt" />
                                            <telerik:EditorRealFontSize Value="36pt" />
                                            <telerik:EditorRealFontSize Value="48pt" />
                                            <telerik:EditorRealFontSize Value="72pt" />
                                        </RealFontSizes>
                                        <Tools>
                                            <telerik:EditorToolGroup>
                                                <telerik:EditorTool Name="Copy" />
                                                <telerik:EditorTool Name="Paste" />
                                                <telerik:EditorTool Name="Bold" />
                                                <telerik:EditorTool Name="FontName" Text="Calibri" />
                                                <telerik:EditorTool Name="RealFontSize" Text="12pt" />
                                                <telerik:EditorTool Name="InsertOrderedList" />
                                                <telerik:EditorTool Name="InsertUnorderedList" />
                                            </telerik:EditorToolGroup>
                                        </Tools>
                                        <FontNames>
                                            <telerik:EditorFont Value="Arial" />
                                            <telerik:EditorFont Value="Arial Black" />
                                            <telerik:EditorFont Value="Arial Narrow" />
                                            <telerik:EditorFont Value="Calibri" />
                                            <telerik:EditorFont Value="Comic Sans MS" />
                                            <telerik:EditorFont Value="Courier New" />
                                            <telerik:EditorFont Value="Georgia" />
                                            <telerik:EditorFont Value="Lucida Console" />
                                            <telerik:EditorFont Value="sans-serif" />
                                            <telerik:EditorFont Value="Tahoma" />
                                            <telerik:EditorFont Value="Times New Roman" />
                                            <telerik:EditorFont Value="Verdana" />
                                        </FontNames>
                                        <Content></Content>
                                    </telerik:RadEditor>
                                    <asp:RequiredFieldValidator ID="rfvMitigationAction" runat="server" ControlToValidate="txtMTEdit"
                                        ErrorMessage="Please Enter Mitigation Action(s)" Display="None" InitialValue=""></asp:RequiredFieldValidator>
                                    <ajaxToolkit:ValidatorCalloutExtender ID="vceMT" runat="server" TargetControlID="rfvMitigationAction"
                                    CssClass="AjaxValidatorCalloutExtender">
                                    </ajaxToolkit:ValidatorCalloutExtender>
                                </EditItemTemplate>
                                <ItemStyle HorizontalAlign="Left" Width="20%" VerticalAlign="Top"></ItemStyle>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="URL" DataField="URL" ItemStyle-HorizontalAlign="Left"
                                HeaderStyle-Width="10%">
                                <ItemTemplate>
                                    <asp:HyperLink ID="hplnkURL" runat="server" Text="View FMEA here" NavigateUrl='<%#Eval("URL")%>'
                                        Target="_blank" ForeColor="Blue"></asp:HyperLink>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:TextBox runat="server" ID="txtURL" Text='<%#Eval("URL")%>' CssClass="textboxCalibri"></asp:TextBox>
                                </EditItemTemplate>
                                <ItemStyle HorizontalAlign="Left" Width="15%"></ItemStyle>
                            </telerik:GridTemplateColumn>
                            <telerik:GridButtonColumn UniqueName="Delete" CommandName="Delete" ButtonType="ImageButton"
                                ImageUrl="..\Images\delete.gif" ConfirmText="Do you want to delete this row?">
                                <ItemStyle HorizontalAlign="Left" Width="4%"></ItemStyle>
                            </telerik:GridButtonColumn>
                        </Columns>
                        <ItemStyle VerticalAlign="Top" />
                        <ItemStyle CssClass="gridlabel" VerticalAlign="Top" />
                        <AlternatingItemStyle CssClass="gridlabel" VerticalAlign="Top" />
                        <HeaderStyle CssClass="gridlabel" />
                        <CommandItemSettings RefreshText="" ShowRefreshButton="false" AddNewRecordImageUrl="../Images/AddRecord.gif" />
                        <NoRecordsTemplate>
                            No Records to display.</NoRecordsTemplate>
                    </mastertableview>
                </telerik:radgrid>
                <telerik:radajaxloadingpanel id="ra1grdRAQ" runat="server" horizontalalign="Center"
                    enableskintransparency="true" skin="Default" backgroundposition="Center">
                </telerik:radajaxloadingpanel>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td align="left" valign="top" class="label" colspan="3">
                FMEA Attachment <span id="spnFMEAv2" visible="false" class="label" runat="server"
                    style="color: Red;">*</span>
            </td>
        </tr>
        <tr>
            <td colspan="3">
                <uc:multipleattachments id="MultipleAttachments" runat="server" documenttype="FMEAv2" />
            </td>
        </tr>
        <tr>
            <td align="left">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td align="left">
                &nbsp;
            </td>
        </tr>
    </table>
</asp:Content>
Kostadin
Telerik team
 answered on 26 Jan 2015
1 answer
139 views
Hi,



I'm using RadScheduler with TimelineView, i have ExactTimeRendering and it
shows the appointments like it should.

Since i have the slots with 12hours, i want to adjust an extra hour, but when i
resize it always adjust an extra 12hours.

I know this functionality it isn't supported, so if someone has the knowledge i would appreacete some help on this requisite:
. like when resize radgrid columns that shows how many pixels, in radschedule when i resize a task shows the exact date time where i am resizing, forcing the task to be aligned where the mouse is, not to nearest 12h point.
. On update, it does it based on the date where i dragged. (this is the easiest part if the other is made)

Thanks in advance,

JJ

Bozhidar
Telerik team
 answered on 26 Jan 2015
2 answers
86 views
Hello,

     I have placed my controls under AjaxPanel and having AjaxLoadingPanel which as been targeted by this AjaxPanel. Whenever there is an Autopostback event my focus on present control will be lost.

    Please help me  get-back focus to respective control under present scenario.

Regards,
Gautham
LMMC
Top achievements
Rank 1
 answered on 24 Jan 2015
1 answer
70 views
I am using q3 2014 release and i have used a rad editor in it .
when i write a long line in rad editor it automaticlly shows me this line as

"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

beacause i have fixed the size of editor.but when i get its html it gives me the same line as :

"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

i want the html content to be same as shown in the editor but i dont want to make any changes in editor size.

Secondly,
Is there any way to get an image of the content that i am able to see in rad editor content area only???????
Ianko
Telerik team
 answered on 24 Jan 2015
1 answer
117 views
I am using Telerik 2014.2.618 version. I am using Rad Editor on a page with NewLineMode propert set to P.
When the user enters some content and press enter key, a P tag is created. However, when a user enters some content and presses down arrow key, a new P tag is not generated. This is creating invalid html and causing rendering issues for us. 
Ianko
Telerik team
 answered on 24 Jan 2015
9 answers
884 views

Hello,

I face a issue with pagesize change event of RadGrid. This event is called two times when a user clicks on "Change" link.
I have set  AllowPaging="True", AllowCustomPaging="True", PagerStyle-Mode="NextPrevNumericAndAdvanced"  
properties of Radgrid related to paging.

In code I have following events...

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load      
    
If Not Page.IsPostBack Then        
        BindGrid()
    
End If
End Sub 

Private Sub BindGrid()  
    '''' grid binding code here using datasource as datatable
    dt = .....
    If dt.Rows.Count > 0 Then
        rGridSubscriptions.VirtualItemCount = dt.Rows(0).Item("total_rows")
    Else
        rGridSubscriptions.VirtualItemCount = 0
    End If
End Sub

Private Sub
rGridSubscriptions_PageSizeChanged(ByVal source As Object, ByVal e As Telerik.Web.UI.GridPageSizeChangedEventArgs) Handles rGridSubscriptions.PageSizeChanged    
    ViewState(
"maxRows") = e.NewPageSize
    BindGrid()
End Sub

This PageSizeChanged is called twice when "Change" link is clicked and hence Bindgrid is called twice. I am using Telerik's Q2 2008 version.
Please if anyone can solve this issue it would be of greate help.

Thanks in advance
Sups

Pavlina
Telerik team
 answered on 23 Jan 2015
1 answer
189 views
I am attempting to load user controls inside a PlaceHolder using a RadMenu. Ajax manager is updating both the menu and the placeholder. When I click on the menu item nothing happens. Initially, when the page loads the homeview.ascx user control does load, but it is not updated on menuitem click.

 ASPX Page

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                        <AjaxSettings>
                            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                                <UpdatedControls>
                                    <telerik:AjaxUpdatedControl ControlID="MainNav" />
                                    <telerik:AjaxUpdatedControl ControlID="BodyContent" LoadingPanelID="RadAjaxLoadingPanel1" />
                                </UpdatedControls>
                            </telerik:AjaxSetting>
                        </AjaxSettings>
                    </telerik:RadAjaxManager>
                <!-- Main Menu -->
                    <div class="menu-wrapper" style="border-top: solid 40px #b1ddab;">
                        <telerik:RadMenu runat="server" ID="MainNav" EnableEmbeddedSkins="false" OnItemClick="MainNav_OnItemClick" CssClass="desktop_nav_menu" >
                            <Items>
                                <telerik:RadMenuItem Text="<%$ Resources:Main, MasterHome %>" />
                                <telerik:RadMenuItem Text="<%$ Resources:Main, MasterTraining %>" />
                                <telerik:RadMenuItem Text="<%$ Resources:Main, MasterSupport %>" />
                            </Items>
                        </telerik:RadMenu>
                    </div>             
                <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>
                <asp:PlaceHolder ID="BodyContent" runat="server">
                      
                </asp:PlaceHolder>


Code Behind

protected void Page_Load(object sender, EventArgs e)
    {
        this.LoadView();
    }
 
private string LoadedControlName
    {
        get
        {
            return (this.ViewState[ViewStateKeys.LoadedControlName] as string) ?? defaultContentControl;
        }
        set
        {
            this.ViewState[ViewStateKeys.LoadedControlName] = value;
        }
    }
 
private void LoadView()
    {
        this.LoadView(this.LoadedControlName);
    }
 
    private void LoadView(string viewName)
    {
        Control control = this.LoadControl(string.Concat(SitePaths.Views, viewName));
        control.ID = viewName;
        this.LoadedControlName = viewName;
        this.BodyContent.Controls.Clear();
        this.BodyContent.Controls.Add(control);
    }
 
    public void MainNav_OnItemClick(object sender, RadMenuEventArgs e)
    {
        RadMenuItem currentItem = e.Item;
        string currentItemText = currentItem.Text;
        string controlPath = string.Empty;
        switch (currentItemText)
        {
            case ("Home"):
                controlPath = DefaultViews.Home;
                break;
            case ("Training"):
                controlPath = DefaultViews.Training;
                break;
            case ("Support"):
                controlPath = DefaultViews.Support;
                break;
            default:
                break;
        }
        if (!String.IsNullOrEmpty(controlPath))
        {
            this.LoadView(controlPath);
        }
    }

View Constants

public class SitePaths
{
    public const string Views = "~/Views/";
}
 
public class ViewStateKeys
{
    public const string LoadedControlName = "LoadedControlName";
}
  
public class DefaultViews
{
    public const string Home = "HomeView.ascx";
    public const string Training = "TrainingView.ascx";
    public const string Support = "SupportView.ascx";
}

Ashley
Top achievements
Rank 1
 answered on 23 Jan 2015
1 answer
199 views
I have a RadGrid with an EditForm containing a RadEditor. The EditForm is shown in a popup and is set to modal.  When I press the 'Toggle Full screen' button, the Editor is 'behind' the modal.  So the area is greyed out and you cannot push any button available in the editor.

Can someone please help me to fix this?

<telerik:RadGrid ID="grdTicketHistory" runat="server" Width="100%" AutoGenerateColumns="false" Skin="Silk" OnNeedDataSource="grdTicketHistory_NeedDataSource" OnItemDataBound="grdTicketHistory_ItemDataBound" OnPreRender="grdTicketHistory_PreRender"
OnUpdateCommand="grdTicketHistory_UpdateCommand" OnDeleteCommand="grdTicketHistory_DeleteCommand" OnInsertCommand="grdTicketHistory_InsertCommand">
                            <MasterTableView AllowSorting="true" Width="100%" EditMode="PopUp" AllowPaging="true" PageSize="10" AllowFilteringByColumn="true" DataKeyNames="TicketLogID"
                                CommandItemDisplay="Top" ShowHeader="false" >
                                <Columns>
                                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" ItemStyle-Width="30px"></telerik:GridEditCommandColumn>
                                    <telerik:GridButtonColumn UniqueName="DeleteCommandColumn" Text="Delete" CommandName="Delete" ButtonType="ImageButton"
                                        ConfirmText="Are you sure you want to delete this record?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" />
                                </Columns>
                                <DetailItemTemplate>
                                    <asp:Table ID="tblDetailItemTemplate" runat="server" Width="100%">
                                        <asp:TableRow>
                                                    <asp:TableRow>
                                                        <asp:TableCell>
                                                            <telerik:RadEditor runat="server" ID="txtLogText" Enabled="false" EditModes="Preview" Height="250px" ></telerik:RadEditor>   
                                                        </asp:TableCell>
                                                    </asp:TableRow>
                                                </asp:Table>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                    </asp:Table>                                       
                                </DetailItemTemplate>
                                <EditFormSettings EditFormType="Template" >
                                    <PopUpSettings Modal="true" Width="1000px" ZIndex="3000" />
                                    <FormTemplate>                                       
                                        <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none" style="border-collapse: collapse;">
                                            <tr>
                                                            <td colspan="2">
                                                                <telerik:RadEditor runat="server" ID="txtLogText" TabIndex="10" ToolsFile="~/xml/ToolsFile.xml"  NewLineMode="Br" OnClientLoad="OnClientLoadRadEditor"></telerik:RadEditor>           
                                                                <asp:CustomValidator id="valLogText" runat="server" ControlToValidate="txtLogText" ErrorMessage="- Text is mandatory" ToolTip="Text is mandatory"> <img src="/cmit/Images/warning.gif" style="border:0" alt=""/></asp:CustomValidator>
                                                            </td>
                                            </tr>
                                            <tr>
                                                <td align="right" style="white-space:normal" colspan="2">
                                                    <asp:Button ID="btnUpdate" TabIndex="11" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></asp:Button> 
                                                    <asp:Button ID="btnCancel" TabIndex="12" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button>
                                                </td>
                                            </tr>
                                        </table>
                                         
                                    </FormTemplate>
                                    <EditColumn ButtonType="ImageButton" />
                                </EditFormSettings>
                            </MasterTableView>
                        </telerik:RadGrid>
                   
    



Ianko
Telerik team
 answered on 23 Jan 2015
1 answer
121 views
Hi,

Does the ticker control support multiple lines?  I have a datatable that returns 5 rows.  I want the ticker to produce 5 lines as well, i.e. not overwrite the orginal one 5 times?

Is this possible?

Thanks

Andy.
Slav
Telerik team
 answered on 23 Jan 2015
6 answers
319 views
I have this RadWindow in a parent page:

<script type="text/javascript">
 function ShowWindow() {
 var oWnd = window.radopen('Window1.aspx', 'window1');
}        
</script>
 
<body>
  <form id="form1" runat="server">
    <div>
      <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
      </telerik:RadScriptManager>
      <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
          </telerik:RadWindowManager>
...........

This is how I open the RadWindow from code behind of the parent page:
...
else
   {
      Session["fatherMessageID"] = id;
      string script = "<script language='javascript' type='text/javascript'>Sys.Application.add_load(ShowWindow);</script>";
      ClientScript.RegisterStartupScript(this.GetType(), "showWindow", script);
    }

This is how I close the RadWindow from inside the RadWindow:
<script type="text/javascript">
        function GetRadWindow() {
            var oWnd = null;
            if (window.radWindow) oWnd = window.radWindow;
            else if (window.frameElement.radWindow) oWnd = window.frameElement.radWindow;
            return oWnd;
        }
        function CloseWindow() {
            var oWnd = GetRadWindow();
            oWnd.close()
        }
    </script>

Calling the script from a button inside the RadWindow:
string script = "<script language='javascript' type='text/javascript'>Sys.Application.add_load(CloseWindow);</script>";
ClientScript.RegisterStartupScript(this.GetType(), "CloseWindow", script);

The problem I am experiencing is that the RadWindow after being opened and closed the first time, keeps reopening later on on page load and on click of any controls on the parent page.
How can I resolve this problem?

Thanks for supporting
Felice
Felice
Top achievements
Rank 1
 answered on 23 Jan 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?