Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
235
UltraWebGrid 10.3 slow performance on client side on IE8, IE9
posted

Hi,

I'm have a UltraWebGrid that holds, lets say, 2000 records. One column is bool data type. When I click on an image from the column header  I try to check/uncheck all checkboxes on the entire column.

First time when I click on the header it takes 10-12 secs to complete the task. Any other attempt takes 1-2 secs. This is happening only for IE, in Firefox everything works just fine.

For tests I'm using an grid without any other feature like sorting, column moving, etc.

Here is the script I use on the client side:

   <script type="text/javascript">
        function f()
        {
            var grid = igtbl_getGridById("UltraWebGrid1");
            for(var i = 0; i < grid.Rows.length; i++)
            {
                var val = grid.Rows.getRow(i).getCell(2).getValue()
                grid.Rows.getRow(i).getCell(2).setValue(!val);
            }
        }
    </script>

Here is the the server side code use to bind the grid data:

 public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            UltraWebGrid1.InitializeLayout += new Infragistics.WebUI.UltraWebGrid.InitializeLayoutEventHandler(UltraWebGrid1_InitializeLayout);

            UltraWebGrid1.DataSource = GetData();
            UltraWebGrid1.DataBind();
       
        }

 

        void UltraWebGrid1_InitializeLayout(object sender, Infragistics.WebUI.UltraWebGrid.LayoutEventArgs e)
        {
            e.Layout.Bands[0].Columns[2].Header.Caption = "<img src='Jellyfish.jpg' onclick='f();' style='width:30px;height:20px;' />";
        }


        private DataTable GetData()
        {
            DataTable result = new DataTable();

            result.Columns.Add(new DataColumn("ID", typeof(int)));
            result.Columns.Add(new DataColumn("Name", typeof(string)));
            result.Columns.Add(new DataColumn("Req", typeof(bool)));

            for (int i = 1; i < 2000; i++)
            {
                DataRow row = result.NewRow();

                row["ID"] = i;
                row["Name"] = "Name" + i.ToString();
                row["Req"] = false;
                result.Rows.Add(row);
            }

            return result;
        }
    }

Thank you in advance,

razvan

 

 

Parents Reply Children