Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
136 views

Hi,

i have an asp.net application using a radgrid. I want to froze some columns.
Everything works fine, but if I set UseStaticHeaders="true" and FrozenColumnsCount="4" the performance of our application will break down extremly.
Our data volumn is as follows: approximately 330 rows with each 55 columns. We build our grid programmatically in our code behind file.

Could you please give us an answer if it is wise to use FrozeColumns with such an data volumn and szenario? If so, please provide some performance hints.

Here the code of my aspx page:
<telerik:RadGrid ID="GridProjectProposals" runat="server" AutoGenerateColumns="false" AllowSorting="true" Height="650px" Width="1200px" GridLines="None" Skin="Windows7" AllowMultiRowSelection="True" AllowFilteringByColumn="True">
    <ClientSettings EnableRowHoverStyle="true">
        <Selecting AllowRowSelect="true" EnableDragToSelectRows="true" />
        <Scrolling AllowScroll="true" EnableVirtualScrollPaging="true" SaveScrollPosition="true" UseStaticHeaders="true" FrozenColumnsCount="4" />
    </ClientSettings>
    <MasterTableView GridLines="None" AllowNaturalSort="true" EditMode="InPlace" AllowMultiColumnSorting="true">
        <Columns>
        </Columns>
        <HeaderStyle Width="180px" />
    </MasterTableView>
</telerik:RadGrid>

Looking forward to get some ideas and your input.

Thanks ...

Pavlina
Telerik team
 answered on 13 Apr 2011
13 answers
135 views
Hello,

I currently updated our Telerik libraries to the latest version (2011.1.315.35) to be accessible to IE9. However, when performing AJAX operations in IE9, the loading panel on the control is not transparent; i.e. in the loading image, with a pure white background, is the only thing visible.
Is this replicable or is this just my browser?

Thanks,
Ernest
Veli
Telerik team
 answered on 13 Apr 2011
1 answer
85 views

Hello Telerik Team,

  We have a problem using TreeListView. Because there are a lot of records as result, we need to use paging in db. First page is displayed ok, but when another page is selected, this error is thrown: “the table must contain row sections in order of header, body, then footer”. VirtualCount is not supported for this control.

 

  See below the definition of the treelist:

 

        <telerik:RadTreeList ID="rtlDescendants" runat="server" ShowTreeLines="true" ShowOuterBorders="true"

            ParentDataKeyNames="ParentInstanceID" DataKeyNames="InstanceID" AutoGenerateColumns="false"

            Skin="Office2007" OnNeedDataSource="rtlDescendants_NeedDataSource" OnItemDataBound="rtl_ItemDataBound"

            AllowPaging="true" AllowSorting="false" PageSize="10" onpageindexchanged="rtlDescendants_PageIndexChanged">

            <PagerStyle Position="Bottom" Mode="NextPrevAndNumeric" />

            <Columns>

                <telerik:TreeListTemplateColumn HeaderText="ID">

                    <ItemTemplate>

                        <asp:Image ID="imgDomain" Width="16px" Height="16px" ImageUrl='<%# String.Format("~/images/Metallic16x16/{0}16x16.png", Eval("DomainName").ToString().ToUpper()) %>'

                            runat="server" />&nbsp;

                        <asp:LinkButton ID="lnkName" runat="server" CausesValidation="false" Text='<%# Eval("Name")%>'

                            PostBackUrl='<%# String.Format("~/CI/Attributes.aspx?InstanceID={0}", Eval("InstanceID")) %>'></asp:LinkButton>

                    </ItemTemplate>

                </telerik:TreeListTemplateColumn>

                <telerik:TreeListTemplateColumn HeaderStyle-Width="3%" ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center">

                    <ItemTemplate>

                        <asp:ImageButton ID="imgbPreview" runat="server" CausesValidation="false" OnClientClick='<%# String.Format("OpenPreviewPanel({0})", Eval("InstanceID")) %>'

                            ImageUrl="~/imagesCMSite/folder-explorer-icon.png" CssClass="image" />

                    </ItemTemplate>

                </telerik:TreeListTemplateColumn>

                <telerik:TreeListBoundColumn HeaderText="Type" HeaderStyle-Width="27%" ItemStyle-Width="27%"

                    DataField="DomainName" UniqueName="DomainName">

                </telerik:TreeListBoundColumn>

                <telerik:TreeListBoundColumn HeaderText="Modified By" HeaderStyle-Width="20%" ItemStyle-Width="20%"

                    DataField="ModifiedBy" UniqueName="ModifiedBy">

                </telerik:TreeListBoundColumn>

                <telerik:TreeListBoundColumn HeaderText="Last Modified" HeaderStyle-Width="20%" ItemStyle-Width="20%"

                    DataField="LastModified" UniqueName="LastModified">

                </telerik:TreeListBoundColumn>

            </Columns>

        </telerik:RadTreeList>


In addition, next pages can include children nodes but their parent could be "located" in previous page

Thank you in advance for your help

Veli
Telerik team
 answered on 13 Apr 2011
1 answer
128 views
Hello everyone,

I would like to ask you,if there is a possible way to re-load the content of a pageView based on a value change from a radiobutton .

More specifically,I have a radio button list where the user can select a product.

Below this list, i have a RadTabStrip which contains 3 RadTabs. Each RadTab has its own RadPageView.
I want to re-load the pageview for a specific tab each time the user selects a product from the radiobutton list.

Could anyone help me with that?

Thanks in advance,
PS
Veronica
Telerik team
 answered on 13 Apr 2011
11 answers
120 views
I have a RadWindow that I show for two differing purposes, and this window is shown when either one of two respective buttons is clicked.  I want to set the window's title and icon based on which button was clicked.  Here's my code:

// Determine which item was clicked
if (eventArgs.get_item().get_text() == "Lock and Submit") {
    // Open the dialog
    var objWindow = $find("<%=rwLockAndSubmitPlan.ClientID%>");
    objWindow.set_title(eventArgs.get_item().get_text());
    objWindow.set_iconUrl("\Images/lock.png");
    objWindow.setUrl("\Dialogs/LockAndSubmitPlan.aspx?mode=lockandsubmit");
    objWindow.show();
}
else if (eventArgs.get_item().get_text() == "Provide Explanations") {
    // Open the dialog
    var objWindow = $find("<%=rwLockAndSubmitPlan.ClientID%>");
    objWindow.set_title(eventArgs.get_item().get_text());
    objWindow.set_iconUrl("\Images/notepad.gif");
    objWindow.setUrl("\Dialogs/LockAndSubmitPlan.aspx?mode=provideexplanations");
    objWindow.show();
}

The issue is that while the window's title is, in fact, changed based on the button that was clicked, the window's icon is not.  The first time I open the dialog, the window's icon is set, but that icon remains the window icon from that point on, not matter which button is clicked.

My RadWindowManager is defined as follows:

<telerik:RadWindowManager runat="server" ID="rwmRadWindowManager" VisibleStatusbar="false" ReloadOnShow="true">
    <Windows>
        <telerik:RadWindow runat="server" ID="rwLockAndSubmitPlan" Modal="true" ReloadOnShow="true" 
            VisibleTitlebar="true" Behaviors="Close" OnClientPageLoad="OnClientPageLoad_SpendingPlan" 
            OnClientClose="OnClientClose_Spending_Plan" Width="550" Height="450" />
    </Windows>
</telerik:RadWindowManager>

And, the OnClientPageLoad_SpendingPlan function is defined as follows:

function OnClientPageLoad_SpendingPlan(objWindow, objArguments) {
    objWindow.set_status("");
}

Perhaps this is a quick fix, so a prompt response would be much appreciated!  Thank you!
Marin Bratanov
Telerik team
 answered on 13 Apr 2011
15 answers
888 views

Telerik.Web.UI.dll version:2010.1.415.35

1. First you need to install Telerik.Web.UI.dll in the GAC

2. Next you should tell SharePoint that the controls from the Telerik.Web.UI.dll is safe to use.

To do so you should add a few <SafeControl> entries within the <SafeControls> section in your web.config:

<SafeControl Assembly="Telerik.Web.UI, Version=2010.1.415.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"

Namespace="Telerik.Web.UI" TypeName="*" Safe="True" />

 

3. You need to register their handlers in the respective section in the web.config:

[web.config] IIS 5.x/6.x/7.x

 

<httpHandlers>

<add verb="*" path="Telerik.Web.UI.DialogHandler.aspx"

type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" />

<add verb="*" path="Telerik.Web.UI.SpellCheckHandler.axd"

type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" />

<add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false" />

</httpHandlers>

 

 

<handlers>

.................

<add name="Telerik.Web.UI.SpellCheckHandler.axd_*" path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*"

type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2010.1.415.35, Culture=neutral,

PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode,runtimeVersionv2.0" />

<add name="Telerik.Web.UI.DialogHandler.aspx_*" path="Telerik.Web.UI.DialogHandler.aspx" verb="*"

type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2010.1.415.35, Culture=neutral,

PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode,runtimeVersionv2.0" />

<add name="Telerik.Web.UI.WebResource.axd_*" path="Telerik.Web.UI.WebResource.axd" verb="*"

type="Telerik.Web.UI.WebResource, Telerik.Web.UI" preCondition="integratedMode,runtimeVersionv2.0" />

.............

</handlers>

Thanks Vinh

Stanimir
Telerik team
 answered on 13 Apr 2011
2 answers
102 views
Hi,

I have a page in which there is a TabStrip with five multipages. In 2 multipages, there are radgrids.

Can you please help with setting Ajax in following scenarios;
How do I do the AjaxSetting for a CheckBox which is inside the radgrid to update some content in the database and refresh the radgrid or is it possible to do an Ajax setting to just update one particular column of the same radgrid when the checkedchanged event is fired?

For fourth multipage there are more than 4 comboboxes and I have to update the content of 3 comboboxes when the selected value of first combobox is changed. What will be the Ajax setting in this case?

Currently I have all the content in the same page but if I want to move the content of 5 multipages to 5  usercontrols , how can I do the  Ajax settings?

Please let me know how to do the Ajax setting in all these different scenarios.

Thanks.
Dimitar Terziev
Telerik team
 answered on 13 Apr 2011
2 answers
85 views
I am using the Editor and all of my applications of it contain a large empty space below the actual Editor window.  The attached screen capture contains an image of the Editor with this specific space colored "yellow".  If I look at the area in the "MS developer tool" (refer to the other screen capture), it is assigned to a css class of "reToolZone".

Can you tell me:

(1) What this space is intended for (that I am apparently not using)?
(2) How can I get rid of this wasteful empty space?  If I'm not using it for anything, there must be some way to eliminated it.

Thanks in advance for the assist!

Lynn
Lynn
Top achievements
Rank 2
 answered on 13 Apr 2011
5 answers
106 views
Hi there.

I have a grid with sorting, filtering, grouping and exporting to excel (html format) enabled. Everything works fine but I can only export to excel if i have not done any sorting, filtering or grouping.

When I try to export, the command bar and filter bar disappear and the last column loses some of its formatting but no exceptions seem to be thrown. I'm using 2010.2.929.35 in DotNetnuke 5.6.1.

Thanks in advance for any suggestions.
Cheers
Chris

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CompanyReports_Scoreboard.ascx.cs" Inherits="Revd.Modules.Managers.CompanyReports_Scoreboard" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<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" />
<table class="FFTableView100pc">
    <tr>
        <td class="FFTableHeader">
            Scoreboard
        </td>
    </tr>
    <tr>
        <td class="FFGeneral">
            The Scoreboard shows all participants and their scores.
        </td>
    </tr>
    <tr>
        <td>
            <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" OnItemCommand="RadGrid1_ItemCommand" AllowPaging="True" AllowSorting="True" DataSourceID="SqlDataSource1" GridLines="None" ShowGroupPanel="True" OnGridExporting="RadGrid1_Exporting" OnItemDataBound="RadGrid1_ItemDataBound" PageSize="20">
                <HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default">
                </HeaderContextMenu>
                <MasterTableView AutoGenerateColumns="False" DataKeyNames="TenantID" DataSourceID="SqlDataSource1" CommandItemDisplay="Bottom">
                    <CommandItemSettings ShowAddNewRecordButton="false" ShowExportToExcelButton="true" ExportToExcelText="Export to Excel" ShowRefreshButton="true" RefreshText="Refresh this view" />
                    <RowIndicatorColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="TenantID" DataType="System.Int32" HeaderText="TenantID" ReadOnly="True" SortExpression="TenantID" UniqueName="TenantID" Visible="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn Groupable="false" DataField="TenantName" HeaderText="Customer Name" SortExpression="TenantName" UniqueName="TenantName">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="PartnerID" DataType="System.Int32" HeaderText="PartnerID" SortExpression="PartnerID" UniqueName="PartnerID" Visible="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="TenantClassification1" HeaderText="Company Size" SortExpression="TenantClassification1" UniqueName="TenantClassification1">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="TenantClassification2" HeaderText="Industry Sector" SortExpression="TenantClassification2" UniqueName="TenantClassification2">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="TenantClassification3" HeaderText="Location" SortExpression="TenantClassification3" UniqueName="TenantClassification3">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ReportStatus" DataType="System.Byte" HeaderText="Status" SortExpression="ReportStatus" UniqueName="ReportStatus" AllowFiltering="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridNumericColumn Groupable="false" NumericType="Percent" DataFormatString="{0:#%}" DataField="Score" DataType="System.Decimal" HeaderText="Score" SortExpression="Score" UniqueName="Score" ItemStyle-Width="70px" FilterControlWidth="22px">
                        </telerik:GridNumericColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings AllowDragToGroup="True" EnableAlternatingItems="false" EnableRowHoverStyle="true">
                </ClientSettings>
                <ExportSettings ExportOnlyData="true" FileName="MyFile" Excel-Format="Html" OpenInNewWindow="true" HideStructureColumns="true" IgnorePaging="true" />
            </telerik:RadGrid>
 
            <script type="text/javascript">
                function onRequestStart(sender, args) {
                    if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0 ||
                            args.get_eventTarget().indexOf("ExportToWordButton") >= 0 ||
                            args.get_eventTarget().indexOf("ExportToCsvButton") >= 0) {
                        args.set_enableAjax(false);
                    }
                }
            </script>
 
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SiteSqlServer %>" SelectCommand="SELECT dbo.__FFTenant.TenantID, dbo.__FFTenant.TenantName, dbo.__FFTenant.PartnerID, dbo.__FFTenant.TenantClassification1, dbo.__FFTenant.TenantClassification2, dbo.__FFTenant.TenantClassification3, dbo._FFFrameworkReport.ReportStatus, dbo._FFFrameworkReport.Score FROM dbo._FFFrameworkReport INNER JOIN dbo.__FFTenant ON dbo._FFFrameworkReport.TenantID = dbo.__FFTenant.TenantID WHERE (dbo.__FFTenant.PartnerID = @UserIsPartnerTenantID) ORDER BY dbo.__FFTenant.TenantName">
                <SelectParameters>
                    <asp:SessionParameter Name="UserIsPartnerTenantID" SessionField="UserIsPartnerTenantID" />
                </SelectParameters>
            </asp:SqlDataSource>
        </td>
    </tr>
    <tr>
        <td>
            <asp:HyperLink ID="lnkCompanyReports" CssClass="FFLinkCommand" runat="server"><img src="<%= skinpath %>images/_FFgoback.png" class="FFImgCommand" />Go to the Company Reports Page</asp:HyperLink>
        </td>
    </tr>
</table>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DotNetNuke.Entities.Modules;
using Telerik.Web.UI;
using Revd.Common.Utilities;
using Revd.DataAccess;
 
namespace RevolutionId.Modules.Managers
{
    public partial class CompanyReports_Scoreboard : PortalModuleBase
    {
        public static string skinpath = "";
        protected void Page_Load(object sender, EventArgs e)
        {
           if (!IsPostBack)
           {
               SessionService.UserIsPartnerTenantID = 30;
               skinpath = base.PortalSettings.ActiveTab.SkinPath;
               lnkCompanyReports.NavigateUrl = _DataUtilities.GetURL_General("", "", 0, _DataUtilities.PageNames.CompanyReports);
           }
        }
 
        protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem gridItem = (GridDataItem)e.Item;
                if (!e.Item.IsInEditMode)
                {
                    int myValue = Convert.ToInt32(DataBinder.Eval(gridItem.DataItem, "ReportStatus"));
                    if (myValue == 0)
                    {
                        gridItem["ReportStatus"].Text = "Work in Progress";
                    }
                    else if (myValue == 1)
                    {
                        gridItem["ReportStatus"].Text = "Completed";
                    }
                    else
                    {
                        gridItem["ReportStatus"].Text = "Don't know";
                    }
                }
            }
        }
 
        protected void RadGrid1_Exporting(object source, Telerik.Web.UI.GridExportingArgs e)
        {
            try
            {
            }
            catch (Exception ex)
            {
                DisplayMessage("Problem occurred. Reason: " + ex.Message);
            }
        }
 
        protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
        {
            try
            {
                if (e.CommandName == "PerformInsert")
                {
                }
            }
            catch (Exception ex)
            {
                DisplayMessage("Problem occurred. Reason: " + ex.Message);
            }
        }
 
        private void DisplayMessage(string text)
        {
            RadGrid1.Controls.Add(new LiteralControl(text));
        }
    }
}
Daniel
Telerik team
 answered on 12 Apr 2011
1 answer
800 views

I have a data bound radscheduler. For which I have created a timeslotcontextmenu eg. Add Appointment and set to postback.

However, everytime I click on the context menu I get the above error with the following stack trace :
 
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.ArgumentNullException: Value cannot be null.
Parameter name: key

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:

[ArgumentNullException: Value cannot be null.
Parameter name: key]
   System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) +44
   System.Collections.Generic.Dictionary`2.FindEntry(TKey key) +7457569
   System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value) +16
   Telerik.Web.UI.RadScheduler.ProcessTimeSlotContextMenuItemCommand(SchedulerPostBackEvent postBack) +106
   Telerik.Web.UI.RadScheduler.ProcessPostBackCommand(SchedulerPostBackEvent postBack) +4638
   Telerik.Web.UI.RadScheduler.RaisePostBackEvent(String eventArgument) +108
   Telerik.Web.UI.RadScheduler.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +39
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565


All other changes to the schedule work fine (moving dates etc.) but the context menu click just comes up with thie error everytime and I cannot understand why.

Please help!
Toxic
Top achievements
Rank 1
 answered on 12 Apr 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
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
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?