Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
162 views
As you might have know, in Visual Studio ASP.NET built-in control, there is a WebControl which is a base class for all webcontrols in ASP.NET.  Is there any equivalent base class like that for Telerik RadControl?

Thanks

LamK.
LamKhoa
Top achievements
Rank 1
 answered on 19 Jul 2011
1 answer
205 views
Hi,

I have a problem exporting a grid to excel.
All works fine but the excel file is empty.

I can confirm that NeedDataSource event is raised and data come from repository when the export button is clicked.
This is the code for export:

       protected void ToExcelButton_Click(object sender, EventArgs e)
          {
                ConfigureExport();
                ListGrid.MasterTableView.ExportToExcel();
          }

          public void ConfigureExport()
          {
                ListGrid.ExportSettings.ExportOnlyData =
true;
                ListGrid.ExportSettings.IgnorePaging =
true;
                ListGrid.ExportSettings.OpenInNewWindow =
true;
                // Hide button columns
                ListGrid.MasterTableView.GetColumn("EditButton").Visible = false;
                ListGrid.MasterTableView.GetColumn("Logo").Visible = false;
                ListGrid.MasterTableView.GetColumn("DeleteButton").Visible = false;
          }

And this is the page code:

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="Quasar.WebUI.Customers.Customers.List" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <title>Quasar | CRM - Customers List</title>
</asp:Content>
 
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
 
    <script type="text/javascript">
        // on ToExcel button click temporarily disables ajax to perform
        // actions
        function conditionalPostback(sender, args) {
            if (args.get_eventTarget().indexOf("ToExcelButton") >= 0) {
                args.set_enableAjax(false);
            }
        }
    </script>
 
   <telerik:RadWindowManager ID="ListRadWindowManager" runat="server" />
 
   <telerik:RadAjaxLoadingPanel ID="ListRadAjaxLoadingPanel" runat="server" Skin="Default" />
 
   <telerik:RadAjaxManager ID="ListRadAjaxManager" runat="server" ClientEvents-OnRequestStart="conditionalPostback">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="ListGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ListGrid" LoadingPanelID="ListRadAjaxLoadingPanel" UpdatePanelHeight="" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
 
    <div class="findField">
        <asp:Label ID="VATLabel" runat="server" AssociatedControlID="VAT">CIF/VAT :</asp:Label>
        <telerik:RadTextBox ID="VAT" runat="server" EmptyMessage="(empty)" MaxLength="25" Columns="15"
            SelectionOnFocus="SelectAll" ToolTip="Find Customer by CIF/VAT"></telerik:RadTextBox>
             
        <asp:Label ID="ContactLabel" runat="server" AssociatedControlID="Contact">Contact :</asp:Label>
        <telerik:RadTextBox ID="Contact" runat="server" EmptyMessage="(empty)" MaxLength="25" Columns="25"
            SelectionOnFocus="SelectAll" ToolTip="Find Customer by Contact"></telerik:RadTextBox>
             
        <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">Email :</asp:Label>
        <telerik:RadTextBox ID="Email" runat="server" EmptyMessage="(empty)" MaxLength="25" Columns="25"
            SelectionOnFocus="SelectAll" ToolTip="Find Customer by Contact Email"></telerik:RadTextBox>
             
        <telerik:RadButton ID="FindButton" runat="server" Icon-PrimaryIconUrl="~/Images/Find.png" Text="Find" Width="75px"
            onclick="FindButton_Click">
        </telerik:RadButton>
    </div>
 
    <telerik:RadGrid ID="ListGrid" runat="server" AllowFilteringByColumn="True"
        AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
        GridLines="None" ShowStatusBar="True" ShowGroupPanel="True"
        EnableLinqExpressions="false"
        onneeddatasource="ListGrid_NeedDataSource"
        onitemcommand="ListGrid_ItemCommand"
        onitemdatabound="ListGrid_ItemDataBound">
 
        <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" AllowDragToGroup="True">
            <Selecting AllowRowSelect="False" />
        </ClientSettings>
 
        <GroupingSettings CaseSensitive="false" />
         
        <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true" FileName="Customers">
                <Excel Format="ExcelML" />
        </ExportSettings>
         
        <MasterTableView Name="Master" DataKeyNames="CustomerId" CommandItemDisplay="Top" CommandItemSettings-ShowRefreshButton="False"
            CommandItemSettings-ShowExportToExcelButton="true">
             
            <RowIndicatorColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
 
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
 
            <NestedViewSettings>
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="ContactId" MasterKeyField="CustomerId" />
                    <telerik:GridRelationFields DetailKeyField="AddressId" MasterKeyField="CustomerId" />
                </ParentTableRelation>
            </NestedViewSettings>
 
            <NestedViewTemplate>
 
                <asp:Panel runat="server" ID="InnerContainer" CssClass="viewWrap">
                    <telerik:RadTabStrip runat="server" ID="CustomersTabStrip" MultiPageID="CustomersMultipage" SelectedIndex="0">
                        <Tabs>
                            <telerik:RadTab runat="server" Text="Contacts" PageViewID="ContactsPageView">
                            </telerik:RadTab>
                            <telerik:RadTab runat="server" Text="Addresses" PageViewID="AddressesPageView">
                            </telerik:RadTab>
                        </Tabs>
                    </telerik:RadTabStrip>
 
                    <telerik:RadMultiPage runat="server" ID="CustomersMultipage" SelectedIndex="0" RenderSelectedPageOnly="false">
 
                        <telerik:RadPageView runat="server" ID="ContactsPageView">
 
                            <telerik:RadGrid ID="ContactsGrid" runat="server" AllowSorting="false" AllowFilteringByColumn="false"
                                PageSize="5" AllowPaging="true" AutoGenerateColumns="False" GridLines="None"
                                onneeddatasource="ContactsGrid_NeedDataSource">
 
                                <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" AllowDragToGroup="True">
                                    <Selecting AllowRowSelect="False" />
                                </ClientSettings>
 
                                <MasterTableView DataKeyNames="ContactId">
 
                                    <Columns>
                                        <telerik:GridBoundColumn DataField="ContactId" HeaderText="Id"
                                            UniqueName="ContactId" Visible="false">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Full Name" DataField="FullName" UniqueName="FullName">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Position" DataField="Position" UniqueName="Position">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Contact Type" DataField="ContactType.Description" UniqueName="ContactType">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridHyperLinkColumn DataNavigateUrlFields="Email" DataNavigateUrlFormatString="mailto:{0}"
                                            DataTextField="Email" HeaderText="Email" UniqueName="Email" Groupable="false"
                                            AllowFiltering="false">
                                        </telerik:GridHyperLinkColumn>
                                        <telerik:GridBoundColumn HeaderText="Phone" DataField="Phone" UniqueName="Phone">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Mobile" DataField="Mobile" UniqueName="Mobile">
                                        </telerik:GridBoundColumn>
                                    </Columns>
 
                                </MasterTableView>
 
                            </telerik:RadGrid>
 
                        </telerik:RadPageView>
 
                        <telerik:RadPageView runat="server" ID="AddressesPageView">
 
                            <telerik:RadGrid ID="AddressesGrid" runat="server" AllowSorting="false" AllowFilteringByColumn="false"
                                PageSize="5" AllowPaging="true" AutoGenerateColumns="False" GridLines="None"
                                onneeddatasource="AddressesGrid_NeedDataSource">
 
                                <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" AllowDragToGroup="True">
                                    <Selecting AllowRowSelect="False" />
                                </ClientSettings>
 
                                <MasterTableView DataKeyNames="AddressId">
 
                                    <Columns>
                                        <telerik:GridBoundColumn DataField="AddressId" HeaderText="Id"
                                            UniqueName="AddressId" Visible="false">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Address Type" DataField="AddressType" UniqueName="AddressType">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Full Address" DataField="FullAddress" UniqueName="FullAddress">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Zip Code" DataField="ZipCode" UniqueName="ZipCode">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="City" DataField="City" UniqueName="City">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Province" DataField="Province" UniqueName="Province">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Country" DataField="Country" UniqueName="Country">
                                        </telerik:GridBoundColumn>
                                    </Columns>
 
                                </MasterTableView>
 
                            </telerik:RadGrid>
 
                        </telerik:RadPageView>
 
                    </telerik:RadMultiPage>
 
                </asp:Panel>
 
            </NestedViewTemplate>
 
            <Columns>
                <telerik:GridButtonColumn ButtonType="ImageButton" Reorderable="False"
                    Resizable="False" ShowFilterIcon="False" ShowSortIcon="False"
                    UniqueName="EditButton" ImageUrl="~/Images/Edit.png" CommandName="Edit">
                    <ItemStyle Width="20px" HorizontalAlign="Center" VerticalAlign="Middle" />
                </telerik:GridButtonColumn>
                <telerik:GridImageColumn AllowFiltering="False" AllowSorting="False"
                    DataAlternateTextField="Name" DataImageUrlFields="Logo"
                    DataImageUrlFormatString="~/Images/Customers/{0}" Groupable="False"
                    HeaderText="Logo" ImageHeight="64px" ImageWidth="64px" ShowSortIcon="False"
                    UniqueName="Logo" ItemStyle-Width="75px">
                    <ItemStyle Width="75px" />
                </telerik:GridImageColumn>
                <telerik:GridBoundColumn DataField="CustomerId" HeaderText="Id" UniqueName="CustomerId" Visible="false"
                    AllowFiltering="False">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Name" HeaderText="Name" UniqueName="Name">
                </telerik:GridBoundColumn>
                <telerik:GridHyperLinkColumn DataNavigateUrlFields="Web" DataNavigateUrlFormatString="{0}" DataTextField="Web"
                    HeaderText="Web" UniqueName="Web" Target="_blank" Groupable="false" AllowFiltering="false">
                </telerik:GridHyperLinkColumn>
                <telerik:GridBoundColumn DataField="Group.Name" HeaderText="Group" UniqueName="Group">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="ActiveGroup" DataField="Group.IsActive" UniqueName="ActiveGroup" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="AccountManager.FullName" HeaderText="Acct. Manager" UniqueName="AccountManager">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="ActiveAcctMgr" DataField="AccountManager.IsActive" UniqueName="ActiveAcctMgr" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="SIC.Description" HeaderText="SIC" UniqueName="SIC">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="ActiveSIC" DataField="SIC.IsActive" UniqueName="ActiveSIC" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridCheckBoxColumn DataField="IsProspect" HeaderText="Prospect" UniqueName="IsProspect">
                </telerik:GridCheckBoxColumn>
                <telerik:GridButtonColumn ButtonType="ImageButton" Reorderable="False"
                    Resizable="False" ShowFilterIcon="False" ShowSortIcon="False"
                    UniqueName="DeleteButton" ImageUrl="~/Images/Delete.png" CommandName="Delete"
                    ConfirmDialogType="RadWindow" ConfirmText="Are you sure you want to delete this record?" ConfirmTitle="Delete record..."
                    ConfirmDialogHeight="130px">
                    <ItemStyle Width="20px" HorizontalAlign="Center" VerticalAlign="Middle" />
                </telerik:GridButtonColumn>
            </Columns>
 
        </MasterTableView>
 
        <PagerStyle Mode="NextPrevAndNumeric" Position="Bottom" />
 
        <HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
 
    </telerik:RadGrid>
 
    <p class="submitButton">
        <telerik:RadButton ID="ToExcelButton" runat="server" Icon-PrimaryIconUrl="~/Images/Save.png" Text="Save" Width="75px"
            onclick="ToExcelButton_Click">
        </telerik:RadButton>
    </p>
 
</asp:Content>

Excel file is generated but with <Row></Row> tags empty.
I'm using Q2 grid.
Regards
Jose
Daniel
Telerik team
 answered on 19 Jul 2011
3 answers
128 views

Hi, i'm developing a RadListView with a pagination performed by a stored procedure that calculates: page index and items loaded within the RadListView. I've noticed that navigation of the RadListView increase the browser's memory process for each async postback.

How can i reduce this memory unnecessarily occupied?

Daniel
Telerik team
 answered on 19 Jul 2011
6 answers
533 views
Hi,

I have a problem with grouping in a radGrid.  When I try to add the grouping, I get the error message "Field xxx not found in the source table".  However, when I remove the GroupByExpressions, the grid populates correctly with the field that was "not found" when the GroupByExpressions were present.  I am using a needDataSource to bind my data as suggested in a previous post since I am pulling the data from an api.  Any help would be greatly apreciated.
-Z

aspx
<telerik:RadGrid ID="dgFeatures" runat="server" GridLines="None" AutoGenerateColumns="False" AllowFilteringByColumn="True"   
            AllowPaging="True" AllowSorting="True" ShowGroupPanel="True" ShowFooter="True" EnableLinqExpressions="false" > 
        <ClientSettings AllowRowsDragDrop="true">  
            <Selecting AllowRowSelect="True" /> 
        </ClientSettings> 
        <MasterTableView GroupLoadMode="Client" ShowGroupFooter="True" allowmulticolumnsorting="True" pagesize="100"  DataKeyNames="Id, Rank, Est,Priority ">  
            <RowIndicatorColumn Visible="False">  
            <HeaderStyle Width="20px"></HeaderStyle> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn Visible="False">  
            <HeaderStyle Width="19px"></HeaderStyle> 
            </ExpandCollapseColumn> 
            <Columns> 
 
                <telerik:GridBoundColumn SortExpression="Name" DataField="Name" HeaderText="Feature"   
                    UniqueName="Feature" ConvertEmptyStringToNull="False" /> 
 
                <telerik:GridBoundColumn SortExpression="Rank" DataField="Rank" HeaderText="Rank"   
                    UniqueName="Rank"/>  
 
                <telerik:GridBoundColumn DataField="ID" HeaderText="Id" UniqueName="Id"   
                    Visible="False"/>  
 
                <telerik:GridBoundColumn DataField="Priority" HeaderText="Priority"   
                    UniqueName="Priority" /> 
 
                <telerik:GridBoundColumn DataField="Backlog"   
                    HeaderText="Backlog Candidate" UniqueName="BacklogCandidate" /> 
 
                <telerik:GridBoundColumn FooterText="Total Points" DataField="PlanEst"   
                    HeaderText="Tech Points" UniqueName="TechPoints" /> 
 
                <telerik:GridBoundColumn DataField="EstRelease" 
                    HeaderText="Est Release" UniqueName="EstRelease" /> 
 
            </Columns> 
            <GroupByExpressions> 
                <telerik:GridGroupByExpression> 
                    <GroupByFields> 
                        <telerik:GridGroupByField FieldName="EstRelease" /> 
                    </GroupByFields> 
                    <SelectFields> 
                        <telerik:GridGroupByField FieldName="EstRelease" HeaderText="Estimated Release Date" /> 
                    </SelectFields> 
                </telerik:GridGroupByExpression> 
            </GroupByExpressions> 
        </MasterTableView> 
        <HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu> 
    </telerik:RadGrid> 

vb
Private Sub dgFeatures_NeedDataSource1(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles dgFeatures.NeedDataSource  
        Me.dgFeatures.DataSource = Me.records  
    End Sub 
Kevin
Top achievements
Rank 1
 answered on 19 Jul 2011
2 answers
1.1K+ views
I have a radUpload control
I'd like to check file name with extension (SomeName.txt) on Client side (JS)
is there a buildin function that i can use to get filename, NOT entire path.
var upload = $find("<%= RadUpload1.ClientID %>")
upload.getFileInputs()[0].value

This code returns entire path i.e (C:\Users\Dev\Documents\SomeName.txt)
i Just need file Name.

or Anyone can suggest RegEx to extract file name????
Basically i need to validate that File name doesn't contain specific character "#".
 
Thanx.
Pasha
Top achievements
Rank 1
 answered on 19 Jul 2011
3 answers
133 views
Hi Support,

I have kept the following options
AdvancedForm-Enabled="true" AdvancedForm-Modal="true"  StartInsertingInAdvancedForm="true"
                        StartEditingInAdvancedForm="false" in my rad scheduler, but I am unable to view the advanced edit form on double clicking an appointment. Please let me know whether I am missing any option . Please help.

Thanks in advance.
Plamen
Telerik team
 answered on 19 Jul 2011
2 answers
151 views
We are currently data binding our grid to an Entity Framework list of objects using the NeedDataSource. There are 160,000 objects with a good amount of data per object. We have paging and filtering by column turned on. There are no groupings or hierarchy. We also have popup editing of rows.

So our question is how can we get the best performance from RadGrid with this setup? Currently, paging through results or doing a filter search on the "Name" of the object is pretty slow. It also takes a two to three seconds to open the popup window to edit the record and same when submitting the edits.

We looked at your Performance demo using LINQ but saw you Cache the entire collection of objects. I don't really think caching a collection of 160,000 objects with some properties being a lot of text sounds like a good idea. I would also think you'd lose performance by not making use of SQL's indexes.

What would you recommend? Would we get performance increases if we used a LINQDataSource instead of assigning our context and objects using the NeedDataSource?

Can the Grid pass Take() and Skip() methods to the database for paging so it is faster?

And it takes about 5 seconds for the grid to return results from a StartsWith filter. Doesn't that simply do a ColumnName LIKE 'SearchTerm%' to the database? Doing this in SQL Management Studio returns instantly but is very slow in RadGrid.
Tsvetoslav
Telerik team
 answered on 19 Jul 2011
1 answer
182 views
For the RadTreeView, I see that we are able to interate through each node and then apply a ForeColor to each node
with the following:

e.Node.ForeColor = System.Drawing.

 

Color.DarkSeaGreen;

 


But, how can we pass a hex color as I do not see how this is possible. - example : e.Node.ForeColor = '#fff'

Next, how is it possible to change a Node's text Font Type to say Ariel or any other font types.

Thank you in advance
 
Plamen
Telerik team
 answered on 19 Jul 2011
3 answers
192 views
Hello,

I have a problem with the radeditor control when it is placed into the radgrid editform (Please view the attached image).
As you can see in the attached image, the radeditor sometimes (Allways on the first time I click on "Add new record" or "Edit") not displayed well.

Here is my code:
Default.aspx:
<%@ Page Title="Code Library Managenment" Language="C#" MasterPageFile="~/Common/MasterPages/DefaultMasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="QtNS.Pages_QualitestSQLServer_CodeLibraryMng_Default" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">
        .EditFormHeader td
        {
            background: white;
            padding: 5px 0px;
        }
</style>
</asp:Content>
 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:Panel ID="MainPanel" style="margin:10px;" runat="server">
<asp:Panel ID="HeaderLabelPanel" HorizontalAlign="Left" Width="100%" runat="server">
    <asp:Label ID="HeaderLabel" runat="server" SkinID="HeaderText" Text="Code Library Managenment" ></asp:Label>
</asp:Panel>
<br />
     
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
 
    <script type="text/javascript">
        function RowDblClick(sender, eventArgs) {
            sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
        }
    </script>
 
</telerik:RadCodeBlock>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="100" />
 
 
<telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1"
    <telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" AllowPaging="True" CssClass="RadGrid" Width="800px"
                AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="true" OnPreRender="RadGrid1_PreRender"
                OnNeedDataSource="RadGrid1_NeedDataSource" OnUpdateCommand="RadGrid1_UpdateCommand" OnItemDataBound="RadGrid1_ItemDataBound"
                OnInsertCommand="RadGrid1_InsertCommand" OnDeleteCommand="RadGrid1_DeleteCommand">
            <MasterTableView Width="100%" CommandItemDisplay="Top" AllowFilteringByColumn="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" CommandItemSettings-RefreshText="<%$ Resources:GeneralTelerikResource, TelerikRadGridRefreshText %>" CommandItemSettings-AddNewRecordText="<%$ Resources:GeneralTelerikResource, TelerikRadGridAddNewRecordText %>" DataKeyNames="SerID">
            <Columns>
                <telerik:GridEditCommandColumn EditText="Edit" UniqueName="EditCommandColumn" >
                </telerik:GridEditCommandColumn>
                <telerik:GridBoundColumn UniqueName="SerID" FilterControlWidth="20px" HeaderText="" Visible="false" DataField="SerID">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn UniqueName="ViewCode" HeaderText="View" AllowFiltering="false" ItemStyle-Width="10%" DataField="Cntnt">
                  <ItemTemplate>
                      <asp:HyperLink ID="ViewCodeHyperLink" runat="server" Text="View" NavigateUrl='<%# "Code.aspx?sid=" + Eval("SerID").ToString() %>'></asp:HyperLink>
                  </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn UniqueName="HasCode" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="50%" HeaderText="">
                  <ItemTemplate>
                     <b>Desc:</b> <asp:Label ID="DescLabelel1" runat="server" Text='<%# Bind("Title") %>'></asp:Label><br />
                     <b>Has Code:</b>  <asp:CheckBox ID="HasCodeCheckBox" runat="server" Enabled="false" Checked='<%# (Eval("Cntnt").ToString().Contains("</code>")) ? true : false %>' ></asp:CheckBox>
                  </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn UniqueName="UserID" HeaderText="User ID" DataField="UserID" ReadOnly="True" Display="False">
                   <ItemTemplate>
                      <asp:Label ID="UserIDLabel" runat="server" Text='<%# Eval("UserID") %>'></asp:Label>
                   </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn UniqueName="UserName" HeaderText="<%$ Resources:MngResource, PagesSecureSqlServerMngRadGridColumnsUserName %>" ItemStyle-Width="12%" DataField="UserName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn UniqueName="LastModifyDate" HeaderText="<%$ Resources:MngResource, PagesSecureSqlServerMngRadGridColumnsLastModifyDate %>" ItemStyle-Width="12%" DataField="LastModifyDate">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn UniqueName="Cntnt" HeaderText="Content" ItemStyle-Width="10%" DataField="Cntnt">
                  <ItemTemplate>
                     ...
                  </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridButtonColumn ConfirmText="<%$ Resources:GeneralTelerikResource, TelerikRadGridDeleteColumnConfirmText %>" ConfirmDialogType="RadWindow" ItemStyle-Width="8%"
                    ConfirmTitle="<%$ Resources:GeneralTelerikResource, TelerikRadGridDeleteColumnConfirmTitle %>" ButtonType="ImageButton" CommandName="Delete" Text="<%$ Resources:GeneralTelerikResource, TelerikRadGridDeleteColumnText %>"
                    UniqueName="DeleteColumn">
                    <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                </telerik:GridButtonColumn>
            </Columns>
            <EditFormSettings UserControlName="~/P/Developers/CodeLibrary/SubUserControl.ascx" EditFormType="WebUserControl">
                <EditColumn  UniqueName="EditCommandColumn1">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <ClientSettings>
            <ClientEvents OnRowDblClick="RowDblClick" />
        </ClientSettings>
    </telerik:RadGrid>
</telerik:RadAjaxPanel
</asp:Panel>
</asp:Content>

SubUserControl.ascx:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SubUserControl.ascx.cs" Inherits="QtNS.Pages_QualitestSQLServer_CodeLibrary_SubUserControl" %>
 
<link rel="stylesheet" type="text/css" href="../../../../Common/Controls/RadEditor/RTLRadEditorStyle/Editor_RTL.css" />
<link rel="stylesheet" type="text/css" href="../../../Common/Design/Style/Style.css" />
 
<table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="1" rules="none"
    style="BORDER-COLLAPSE: collapse">
    <tr align="left">
        <td colspan="2">
            <asp:Panel ID="LastModifyPanel" runat="server" HorizontalAlign="<%$ Resources:MngResource, NoContentFloat %>" Visible='<%# ((bool)DataBinder.Eval(Container, "OwnerTableView.IsItemInserted")) ? false : true %>' Width="100%">
                <asp:Label ID="LastModifyByTextLabel" runat="server" Font-Bold="true" Text="<%$ Resources:MngResource, LastModifyBy %>" ></asp:Label>
                <asp:Label ID="LastModifyByIDLabel" runat="server" Text='<%#  DataBinder.Eval( Container, "DataItem.UserName" ) %>'></asp:Label>
                <asp:Label ID="LastModifyDateTextLabel" runat="server" Font-Bold="true" Text="<%$ Resources:MngResource, LastModifyDate %>" ></asp:Label>
                <asp:Label ID="LastModifyDateLabel" runat="server" Text='<%#  DataBinder.Eval( Container, "DataItem.LastModifyDate" ) %>'></asp:Label>
            </asp:Panel>   
        </td>
    </tr>
    <tr align="left">
        <td>
            <table id="Table3" cellspacing="1" cellpadding="1" width="100%" border="0">
                <tr>
                    <td class="FirstColumn"></td>
                    <td class="SecondColumn"></td>
                </tr>
                <tr valign="top">
                    <td class="FirstColumn">
                        <asp:Label ID="TitleLabel" runat="server" Text="Title:"></asp:Label>
                    </td>
                    <td class="SecondColumn">
                        <telerik:RadTextBox ID="TitleRadTextBox" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.Title" ) %>' MaxLength="300" Width="600px" >
                        </telerik:RadTextBox>
                    </td>
                </tr>
                <tr>
                  <td  class="FirstColumn" valign="top">
                      <asp:Label ID="CntntLabel" runat="server" Text="<%$ Resources:Resource, SecureSqlServerCodeHelperRadGridUserControlCntntLabel %>"></asp:Label>
                  </td>
                  <td class="SecondColumn" valign="top">
                        <telerik:RadEditor runat="server" ID="CntntRadEditor" Height="500px" Width="100%" style="z-index:1000;" Content='<%# DataBinder.Eval( Container, "DataItem.Cntnt") %>' ToolsFile="~/Common/Controls/RadEditor/xml/CustomFullSetOfToolsForSecureTables.xml">
                            <Modules>
                                <telerik:EditorModule Visible="false" />
                            </Modules>
                        </telerik:RadEditor>
                  </td>
               </tr>
            </table>
        </td>
     </tr>
     <tr>
        <td align="left" colspan="2">
            <asp:button id="btnUpdate" text="<%$ Resources:GeneralTelerikResource, TelerikRadGridEditFormUpdateButtonText %>" runat="server" CommandName="Update" Visible='<%# !(DataBinder.Eval( Container, "DataItem") is Telerik.Web.UI.GridInsertionObject) %>'></asp:button>
                <asp:button id="btnInsert" text="<%$ Resources:GeneralTelerikResource, TelerikRadGridEditFormInsertButtonText %>" runat="server" CommandName="PerformInsert" Visible='<%# DataBinder.Eval( Container, "DataItem") is Telerik.Web.UI.GridInsertionObject %>'></asp:button>
                  
                <asp:button id="btnCancel" text="<%$ Resources:GeneralTelerikResource, TelerikRadGridEditFormCancelButtonText %>" runat="server" causesvalidation="False" commandname="Cancel"></asp:button></td>
    </tr>
</table>

Style:
.FirstColumn
{
width:15%;
}
.SecondColumn
{
width:85%;
}

Note: As i sayed, the radeditor is displyed as it is shown in the screen shot just on the first time I click "Add new record" or "Edit". After that the radeditor will be displayed normally even if I click the "Add new record" or "Edit" linkbuttons.

Please, I need your help to solve this problem,
It is appreciatede to send me the modified code.

Regards,
Bader
Rumen
Telerik team
 answered on 19 Jul 2011
1 answer
80 views
Hi, we noticed the following bugs occurring in the current release of the RadEditor that occurs both on our website and in this demo :
<http://demos.telerik.com/aspnet-ajax/editor/examples/default/defaultcs.aspx>

  • Under Safari: The underline button is acting weird, when you press it and no text is selected, the next typed text will be underlined but the button won't look pressed. If you toggle it the next typed text won't get underlined but the button will look pressed.
  • Under both Opera and Chrome: When you press enter, the scroll-bar won't follow
  • Under Opera and Safari, sometimes, you can't un-highlight text when it's pasted from word
  • Under Firefox, if you first click on the background color button and then type text, the text will not be highlighted

Theses bugs happen under both these versions of the RadEditor
v2011.2.712.40
v2011.1.519.35
Rumen
Telerik team
 answered on 19 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?