Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
234 views
Hello,

  I am on Q2 2010 SP2, How can i improve the performance of my RadGrid, it has just 75 rows but it takes close to 7 seconds when i navigate between pages each of size 25, Is there a way to improve this latency? I am using filtering and sorting. Here is a sample of my grid declaration.

Lot of the help i got from previous posts don't work for filtering and sorting option. Any help is greatly appreciated.

Thanks,
Kavitha
<telerik:radgrid id="RadGrid1" width="100%" allowfilteringbycolumn="true" showstatusbar="true"
           allowsorting="True" allowpaging="True" pagesize="100" runat="server" autogeneratecolumns="False"
           enablelinqexpressions="false" onitemcommand="RadGrid1_ItemCommand" onneeddatasource="RadGrid1_NeedDataSource"
           allowmultirowselection="true" OnPreRender="RadGrid1_PreRender" OnItemDataBound="RadGrid1_ItemDataBound">
           <PagerStyle Mode="NextPrevAndNumeric" Position="Top" AlwaysVisible="true" />
           <mastertableview datakeynames="WorkOrderID" clientdatakeynames="WorkOrderID">
           <CommandItemSettings ShowAddNewRecordButton="false" />
               <Columns>
                   <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-Width="50px">
                   </telerik:GridClientSelectColumn>
                   <telerik:GridBoundColumn UniqueName="WorkOrderID" DataField="WorkOrderID" HeaderText="Work Order ID">
                       <FilterTemplate>
                           Clear filters
                           <asp:ImageButton ID="btnShowAll" runat="server" ImageUrl="~/Img/filterCancel.gif"
                               AlternateText="Show All" ToolTip="Show All" OnClick="btnShowAll_Click" Style="vertical-align: middle" />
                       </FilterTemplate>
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn UniqueName="DateAdded" DataField="DateAdded" HeaderText="Date Added"
                       DataFormatString="{0:d}" HeaderStyle-Width="90px">
                       <FilterTemplate>
                           <telerik:RadComboBox ID="RadComboDateAdded" DataTextField="DateAdded" DataValueField="DateAdded"
                               Height="200px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("DateAdded").CurrentFilterValue %>'
                               runat="server" OnClientSelectedIndexChanged="DateAddedIndexChanged" OnLoad="RadComboBoxDateAdded_OnLoad">
                               <Items>
                                   <telerik:RadComboBoxItem Text="All" Selected="true" />
                               </Items>
                           </telerik:RadComboBox>
                           <telerik:RadScriptBlock ID="RadScriptBlock5" runat="server">
                               <script type="text/javascript">
                                   function DateAddedIndexChanged(sender, args) {
                                       var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                       tableView.filter("DateAdded", args.get_item().get_value(), "EqualTo");
                                   }
                               </script>
                           </telerik:RadScriptBlock>
                       </FilterTemplate>
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn UniqueName="DateUpdated" DataField="DateUpdated" HeaderText="Updated Date"
                       DataFormatString="{0:d}" HeaderStyle-Width="90px">
                       <FilterTemplate>
                           <telerik:RadComboBox ID="RadComboDateUpdated" DataTextField="DateUpdated" DataValueField="DateUpdated"
                               Height="200px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("DateUpdated").CurrentFilterValue %>'
                               runat="server" OnClientSelectedIndexChanged="DateUpdatedIndexChanged" OnLoad="RadComboBoxDateUpdated_OnLoad" OnItemDataBound="RadComboDateUpdated_ItemDataBound">
                               <Items>
                                   <telerik:RadComboBoxItem Text="All" Selected="true" />
                               </Items>
                           </telerik:RadComboBox>
                           <telerik:RadScriptBlock ID="RadScriptBlock6" runat="server">
                               <script type="text/javascript">
                                   function DateUpdatedIndexChanged(sender, args) {
                                       var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                       tableView.filter("DateUpdated", args.get_item().get_value(), "EqualTo");
                                   }
                               </script>
                           </telerik:RadScriptBlock>
                       </FilterTemplate>
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn UniqueName="Status" DataField="Status" HeaderText="Status"
                       HeaderStyle-Width="200px">
                       <FilterTemplate>
                           <telerik:RadComboBox ID="RadComboBoxStatus" DataTextField="Status" DataValueField="Status"
                               Height="200px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Status").CurrentFilterValue %>'
                               runat="server" OnClientSelectedIndexChanged="StatusIndexChanged" OnLoad="RadComboBoxStatus_OnLoad" OnItemDataBound="RadComboStatus_ItemDataBound">
                               <Items>
                                   <telerik:RadComboBoxItem Text="All" Selected="true" />
                               </Items>
                           </telerik:RadComboBox>
                           <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">
                               <script type="text/javascript">
                                   function StatusIndexChanged(sender, args) {
                                       var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                       tableView.filter("Status", args.get_item().get_value(), "EqualTo");
                                   }
                               </script>
                           </telerik:RadScriptBlock>
                       </FilterTemplate>
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn UniqueName="Category" DataField="Category" HeaderText="Category"
                       HeaderStyle-Width="200px">
                       <FilterTemplate>
                           <telerik:RadComboBox ID="RadComboBoxCategory" DataTextField="Category" DataValueField="Category"
                               Height="200px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Category").CurrentFilterValue %>'
                               runat="server" OnClientSelectedIndexChanged="CategoryIndexChanged" OnLoad="RadComboBoxCategory_Onload" OnItemDataBound="RadComboCategory_ItemDataBound">
                               <Items>
                                   <telerik:RadComboBoxItem Text="All" />
                               </Items>
                           </telerik:RadComboBox>
                           <telerik:RadScriptBlock ID="RadScriptBlock3" runat="server">
                               <script type="text/javascript">
                                   function CategoryIndexChanged(sender, args) {
                                       var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                       tableView.filter("Category", args.get_item().get_value(), "EqualTo");
                                   }
                               </script>
                           </telerik:RadScriptBlock>
                       </FilterTemplate>
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn UniqueName="Addr1" DataField="Addr1" HeaderText="Street Address"
                       HeaderStyle-Width="100px" AllowFiltering="false">                   
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn UniqueName="City" DataField="City" HeaderText="City"
                       HeaderStyle-Width="100px" AllowFiltering="false">                        
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn UniqueName="State" DataField="State" HeaderText="State"
                       HeaderStyle-Width="100px">
                       <FilterTemplate>
                           <telerik:RadComboBox ID="RadComboBoxState" DataTextField="State" DataValueField="State"
                               Height="200px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("State").CurrentFilterValue %>'
                               runat="server" OnClientSelectedIndexChanged="StateIndexChanged" OnLoad="RadComboBoxState_OnLoad" Width="50px" OnItemDataBound="RadComboState_ItemDataBound">
                               <Items>
                                   <telerik:RadComboBoxItem Text="All" />
                               </Items>
                           </telerik:RadComboBox>
                           <telerik:RadScriptBlock ID="RadScriptBlock9" runat="server">
                               <script type="text/javascript">
                                   function StateIndexChanged(sender, args) {
                                       var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                       tableView.filter("State", args.get_item().get_value(), "EqualTo");
                                   }
                               </script>
                           </telerik:RadScriptBlock>
                       </FilterTemplate>
                   </telerik:GridBoundColumn>
               </Columns>
           </mastertableview>
           <clientsettings enablerowhoverstyle="true">
               <Selecting AllowRowSelect="True" />
               <ClientEvents OnRowSelected="RadGrid1_RowSelected" OnRowDeselected="RadGrid1_RowDeselected" OnGridCreated="GridCreated" />
           </clientsettings>
       </telerik:radgrid>
Pavlina
Telerik team
 answered on 02 May 2011
1 answer
67 views
Hi,

I need a row in the radgrid to be kept highlighted after the user navigate back to the original page using the pager. By default, if user navigates to a new page after selecting a row, the row will not be highlighted any more after navigating back to the original page. I thought session state might be a way for me to do this, but I failed to do so.

 I am new to telerik and not very familiar with rad controls. Could anyone please help me on how to do this?  Thanks a lot.

Meng
Pavlina
Telerik team
 answered on 02 May 2011
2 answers
87 views
My rad conrol grid is working fine, but one of the user is asking me to put a label right next to the paging icons, the front and previuos icons. Is their any way I can access that area. I need to put a label there that says something about the data that is present in the grid.I could have displayed it in the footer, but he really wants to see the label right next to the navigation buttons.

Any help will be greatly appreciated.
Anjali
Top achievements
Rank 1
 answered on 02 May 2011
9 answers
223 views
Hi everyone,

Please, some light with my problem...

I have a RadGrid (principal) with NestedViewTemplate, in this NestedView I have one RadChar and one RadGrid (slave).

The problem is that when I select one item on main RadGrid (principal) and is showed the RadChart and the RadGrid (slave), the values of RadChart and RadGrid (slave) don´t change anymore. 

I believe that exists a command to force update controls into NestedView, considering the parameters from main RadGrid (principal).

Thanks, best

Daniel
Daniel Aquere
Top achievements
Rank 2
 answered on 02 May 2011
4 answers
61 views
When the Content property of the RadEditor is read during development it uses the url as localhost.  At runtime when the value is set in production it will of course need to to use the domain name. 

Anyone have an example of handling this efficiently?  I can of course use an HTMLHelper to parse the value and do a search and replace, just curious if there are any other putfals in this topic.

Thanks,
Reid
Reid
Top achievements
Rank 2
 answered on 02 May 2011
3 answers
55 views
This something the RadButton has that I'd like to see in the Toolbar as well

I don't want each toolbar button to have it's own "ImageURL" so I get more resources downloaded.

Instead what I'd like is the ability to say

ImagePosition="Right" ImageCss="PrevButton"

So the image element for that button would be inserted left or right (depending on the Position set), but have the CssClass applied instead of an image so the css allows me to use a background image sprite.

I know I can probably skirt it by setting CSS to be like "Prev_right" and "Prev_left" but I'd like to make this easier for my devs...the RadButton handles it very elegantly.

PLEASE :)
Simon
Telerik team
 answered on 02 May 2011
2 answers
154 views
I have simple page in Net 4.0 and getting below error and below you will the code as well

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   Telerik.Web.UI.PreControlToAjaxify.Render(HtmlTextWriter writer) +113
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +245
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +245
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +306
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +47
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +245
   System.Web.UI.Page.Render(HtmlTextWriter writer) +39
   Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +666
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
   System.Web.UI.Page.Render(HtmlTextWriter writer) +39
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4942


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1



Code:
Default.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Src="WebUserControl.ascx" TagName="WebUserControl" TagPrefix="uc1" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        </telerik:RadAjaxManager>
        <uc1:WebUserControl ID="WebUserControl1" runat="server" />

    </form>
</body>
</html>



Default.aspx.cs:

using System;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
}



WebUSerControl.acsx:

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="WebUserControl.ascx.cs" Inherits="WebUserControl" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server">
    <AjaxSettings>
    <telerik:AjaxSetting AjaxControlID="OrdersGrid">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="OrdersGrid" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="EmployeesGrid">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="EmployeesGrid" />
            </UpdatedControls>
        </telerik:AjaxSetting>
       
    </AjaxSettings>
 
</telerik:RadAjaxManagerProxy>

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
<telerik:RadGrid ID="EmployeesGrid"  runat="server" AutoGenerateColumns="true"
    AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="True" PageSize="5"
    GridLines="None" ShowStatusBar="true" style="margin-bottom: 20px;">
    <PagerStyle Mode="NumericPages"></PagerStyle>

    <ClientSettings EnablePostBackOnRowClick="true">
        <Selecting AllowRowSelect="true" />
    </ClientSettings>
</telerik:RadGrid>

<telerik:RadTabStrip runat="server" ID="RadTabStrip1" MultiPageID="RadMultiPage1"
    SelectedIndex="0">
    <Tabs>
        <telerik:RadTab runat="server" Text="Sanjay" PageViewID="PageView1" />
        <telerik:RadTab runat="server" Text="Sanjay" PageViewID="PageView2" />
    </Tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0" RenderSelectedPageOnly="false">
    <telerik:RadPageView runat="server" ID="PageView1">
    <telerik:RadGrid ID="RadGrid1"  runat="server" AutoGenerateColumns="true"
    AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="True" PageSize="5"
    GridLines="None" ShowStatusBar="true" style="margin-bottom: 20px;">
    <PagerStyle Mode="NumericPages"></PagerStyle>

    <ClientSettings EnablePostBackOnRowClick="true">
        <Selecting AllowRowSelect="true" />
    </ClientSettings>
</telerik:RadGrid>
   
    </telerik:RadPageView>
    <telerik:RadPageView>
    <telerik:RadGrid ID="RadGrid2"  runat="server" AutoGenerateColumns="true"
    AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="True" PageSize="5"
    GridLines="None" ShowStatusBar="true" style="margin-bottom: 20px;">
    <PagerStyle Mode="NumericPages"></PagerStyle>

    <ClientSettings EnablePostBackOnRowClick="true">
        <Selecting AllowRowSelect="true" />
    </ClientSettings>
</telerik:RadGrid>
   
    </telerik:RadPageView>
      </telerik:RadMultiPage>

 



WebUserControl.acxs.cs:

using System;
using System.Data;

public partial class WebUserControl : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        DataTable dt = new DataTable();

 

        dt.Columns.Add(new DataColumn("Contract Number", typeof(string)));

        dt.Columns.Add(new DataColumn("Customer Name", typeof(string)));

    

        DataRow dr = dt.NewRow();

       

        dr["Customer Name"] = "Sanjay"; 
        dr["Contract Number"] = "Sanjay";

        dt.Rows.Add(dr);

        EmployeesGrid.DataSource = dt;
        EmployeesGrid.DataBind();
       

    }
}

Maria Ilieva
Telerik team
 answered on 02 May 2011
2 answers
89 views
is there is anyway to make the radwindows just load on demand like radtooltip?
i mean load on demand an ascx control in the ContentTemplate
Svetlina Anati
Telerik team
 answered on 02 May 2011
1 answer
90 views
Hi, 

The tooltip doesn't work in IE7 version. It works fine in IE8/9 and other browsers. could you please help me in finding out why it isn't. I see that Radtooltip is browser compatible and should work well across all the browsers, but am not able to figure out why this is happening with my code. 

I would greatly appreciate your help on this. Already spent hours on debugging this issue.


Thanks.
Svetlina Anati
Telerik team
 answered on 02 May 2011
1 answer
243 views
Hi,

I am using the RadUpload control and facing problems with that.

Whenever I submit the page

UploadedFiles.Count

Always returns the 0, I am using it in a very simple page with just the Upload control and the asp Button to submit.
 
I want to clerify that I am not using any ajax functionality, it is just a simple page.

Anyone knows about this problem??

I have attatched my project, Please suggest something.
Peter Filipov
Telerik team
 answered on 02 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?