This is a migrated thread and some comments may be shown as answers.

Column swapping is not working in IE6 and IE7

1 Answer 56 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Babu Puchakayala
Top achievements
Rank 1
Babu Puchakayala asked on 16 Jun 2010, 09:31 PM
Hi,

I recently bought telerik control for asp.net Ajax. when i have columns more than 500 and when doing swapping its getting stuck for both ie6 and ie7 browsers. But its working great in Firefox. How to solve this issue? Is there any way to get rid of this? Most of the customers who working on my application are using ie6 or ie7. Please help me.

Thanks

Here is My grid code.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Trackers.aspx.cs" Inherits="Trackers" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!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
    <link href="CSS/Forest.css" rel="stylesheet" type="text/css" /> 
</head> 
<body> 
    <form id="form1" runat="server"
    <style type="text/css"
        .rgPageFirst, .rgPagePrev, .rgPageNext, .rgPageLast 
        { 
            display: none !important; 
        } 
    </style> 
    <style type="text/css"
        div.RemoveBorders .rgHeader, div.RemoveBorders th.rgResizeCol, div.RemoveBorders .rgFilterRow td 
        { 
            border-width: 0 0 1px 0; /*top right bottom left*/ 
        } 
        div.RemoveBorders .rgRow td, div.RemoveBorders .rgAltRow td, div.RemoveBorders .rgEditRow td, div.RemoveBorders .rgFooter td 
        { 
            border-width: 0; 
            padding-left: 7px; /*needed for row hovering and selection*/ 
        } 
        div.RemoveBorders .rgGroupHeader td, div.RemoveBorders .rgFooter td 
        { 
            padding-left: 7px; 
        } 
    </style> 
 
    <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("ExportToPdfButton") >= 0 || 
                    args.get_eventTarget().indexOf("ExportToCsvButton") >= 0) { 
 
                args.set_enableAjax(false); 
            } 
        } 
    </script> 
 
    <div style="padding: 10px"
        <telerik:RadScriptManager ID="sm" runat="server"
        </telerik:RadScriptManager> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="gvTrackers"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="gvTrackers" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"
        </telerik:RadAjaxLoadingPanel> 
        <telerik:RadGrid ID="gvTrackers" Skin="Forest" EnableEmbeddedSkins="true" Height="600px" 
            runat="server" AllowPaging="true" AllowSorting="True" GridLines="None" AutoGenerateColumns="true" 
            EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true" AllowMultiRowSelection="true" 
            AllowFilteringByColumn="True" OnNeedDataSource="gvTrackers_NeedDataSource" OnItemCreated="gvTrackers_ItemCreated" 
            OnItemCommand="gvTrackers_ItemCommand" OnColumnCreated="gvTrackers_ColumnCreated"
            <HeaderStyle Height="25px" Width="100px" Font-Size="8pt" Font-Bold="True" ForeColor="White" 
                HorizontalAlign="Center" BorderColor="white" BorderWidth="1px" /> 
            <ExportSettings IgnorePaging="true" ExportOnlyData="true"
                <Pdf AllowModify="false" AllowPrinting="true" PageWidth="16in" /> 
            </ExportSettings> 
            <MasterTableView AllowMultiColumnSorting="true" CommandItemDisplay="Top"
                <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true" 
                    ShowExportToCsvButton="true" ShowExportToPdfButton="true" ShowAddNewRecordButton="false" /> 
            </MasterTableView> 
            <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True"
                <Scrolling AllowScroll="true" EnableVirtualScrollPaging="false" UseStaticHeaders="true" /> 
                <Selecting AllowRowSelect="True"></Selecting> 
                <Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True" 
                    ResizeGridOnColumnResize="False"></Resizing> 
            </ClientSettings> 
            <GroupingSettings ShowUnGroupButton="true" /> 
            <PagerStyle Mode="NextPrevAndNumeric" HorizontalAlign="Right" Font-Bold="true" AlwaysVisible="true" /> 
        </telerik:RadGrid> 
    </div> 
    </form> 
</body> 
</html> 
 

.CS code

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Web; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Data; 
using System.IO; 
using Telerik.Web.UI; 
public partial class Trackers : System.Web.UI.Page 
    protected void Page_Load(object sender, EventArgs e) 
    { 
        try 
        { 
            if (!IsPostBack) 
            { 
                bindGrid(); 
            } 
        } 
        catch (Exception ex) 
        { 
            throw ex; 
 
        } 
    } 
 
    protected void gvTrackers_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) 
    { 
        bindGrid(); 
    } 
 
    private void bindGrid() 
    { 
       if (Request.QueryString.Count > 0) 
           { 
               DBLayer clsObj = new DBLayer(); 
               DataTable dt = new DataTable(); 
               DataSet dsRes = new DataSet(); 
               string strQry = Request.QueryString[0].ToString(); 
               if(strQry=="1") 
                   dsRes = clsObj.ExecuteDatasetSql("usp_CarrierTracker"); 
               else if (strQry == "2") 
                   dsRes = clsObj.ExecuteDatasetSql("usp_RejectRescheduleHistory"); 
               else if (strQry == "3") 
                   dsRes = clsObj.ExecuteDatasetSql("usp_ActualPlanTestDate"); 
               else if (strQry == "4") 
                   dsRes = clsObj.ExecuteDatasetSql("usp_billing_ckt_report"); 
               else if (strQry == "5") 
                   dsRes = clsObj.ExecuteDatasetSql("usp_ReadyandCompeletetask"); 
               else if (strQry == "6") 
                   dsRes = clsObj.ExecuteDatasetSql("usp_TTUNotes"); 
 
               gvTrackers.DataSource = dsRes
               //gvTrackers.DataBind(); 
           } 
    } 
 
    protected void gvTrackers_ItemCreated(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridPagerItem) 
        { 
            RadComboBox combo = (e.Item as GridPagerItem).FindControl("PageSizeComboBox") as RadComboBox; 
 
            // The number of items shown when all is selected  
            int allRowsCount = int.MaxValue; 
 
            // Remove duplicates  
            RadComboBoxItem duplicate = combo.Items.FindItemByValue(allRowsCount.ToString()); 
            if (duplicate != null) 
            { 
                duplicate.Remove(); 
            } 
 
            // Create a new item for showing all  
            RadComboBoxItem item = new RadComboBoxItem("All", allRowsCount.ToString()); 
            item.Attributes.Add("ownerTableViewId", e.Item.OwnerTableView.ClientID); 
            combo.Items.Add(item); 
 
            // Set the current pagesize as the selected value  
            combo.Items.FindItemByValue(gvTrackers.PageSize.ToString()).Selected = true
        } 
    } 
 
    protected void gvTrackers_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e) 
    { 
        //if (e.CommandName == Telerik.Web.UI.RadGrid.ExportToExcelCommandName || 
        //    e.CommandName == Telerik.Web.UI.RadGrid.ExportToWordCommandName || 
        //    e.CommandName == Telerik.Web.UI.RadGrid.ExportToCsvCommandName || 
        //    e.CommandName == Telerik.Web.UI.RadGrid.ExportToPdfCommandName) 
        //{ 
        //    ConfigureExport(); 
        //} 
    } 
 
    protected void gvTrackers_ColumnCreated(object sender, GridColumnCreatedEventArgs e) 
    { 
        e.Column.Groupable = false
 
    } 
 

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 22 Jun 2010, 06:10 AM
Hi Babu,

Column reordering on the client involves intensive DOM operations and IE is not very good at those in terms of performance. I am afraid you are hitting the browser limits in this case, so please reorder columns on the server only by setting ReorderColumnsOnClient="false" (default value) in the RadGrid's ClientSettings.

Greetings,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Babu Puchakayala
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or