Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
120 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
502 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.0K+ 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
119 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
143 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
169 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
167 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
73 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
7 answers
213 views

PLEASE HELP!!!

We are using RAD Editor for .Net 2.0 v6.6.3.0

We are trying to add two RadEditors from code behind to  a page by using a wrapper class. Sample code:

using Telerik.WebControls;  
 
public class TextEditorControl : System.Web.UI.Page  
{  
    protected RadEditor editor;  
    protected string id;  
      
    public TextEditorControl(string id) : base()  
    {  
        editor = new RadEditor();  
        this.id = id;  
    }  
 
    protected override void OnInit(EventArgs e)  
    {  
        // Initialize all necessary properties  
        editor.Editable = true;  
        // ...  
 
        this.Controls.Add(editor);  
        editor.ID = this.id;    // Changing editor id from "ctl00" to our custom id
    }

Later we add this control to one of the tabs in our main display page. Sample code:

public class MainPage : System.Web.UI.Page  
{  
    protected override void OnInit(EventArgs e)  
    {  
        //Add controls to the page based on an xml settings file  
        //...  
        TableCell tdContainer;  
          
        if (controlType = "TextEditorControl")  
        {  
            tdContainer.Controls.Add(new TextEditorControl(controlId));  
        }  
 
        //Other code  
        //...  
    }  
 
    protected void Page_Error(Object sender, EventArgs e)  
    {  
        //Catch the error as an exception  
    }  

For the first time, both RadEditor controls load fine. Then if we navigate to the next tab in the page, and try to navigate back to the previous tab containing the two RadEditor controls, we receive the following Exception caught through Page_Error function:
{"Multiple controls with the same ID '__Page' were found. FindControl requires that controls have unique IDs."

Kindly note that adding one RadEditor to the page always used to work fine for us (may be just one control with '__Page' id). Now we do have to add multiple controls. Please help!
Rumen
Telerik team
 answered on 19 Jul 2011
1 answer
72 views
Hi All,
Some time back i have installed RAD Conrtols 3.5  and that were runnning with Sharepoint perfectly.But i think this has been expired now.
Currently on the website, RAD Conrtols 4.0 is available but that i am not able to integrate with Sharepoint as Sharepoint works on 3.5 Framewrok.

How to solve this problem ?

Thanks in Advance,
Ankit
Kalina
Telerik team
 answered on 19 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?