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
Hi razvan,
Thank you for posting in the community.
IE (epsecially IE8), is known to have issues when rendering table elements and therefore iterating through the grid rows on the client is taking long. It may be worth trying to force your page into compatible mode in order to check whether that makes a difference in your page performance.
Please note that the UltraWebGrid control is now outdated and as of .NetAdvantage 2011 Volume 2 is no longer included in our product package. I would suggest that you consider switching to the WebDataGrid/WebHieararchicalDataGrid. More information regarding these controls is available at:
http://help.infragistics.com/NetAdvantage/ASPNET/2011.2/CLR4.0/?page=Web_WebDataGrid_WebDataGrid.html
Additional samples demonstrating the features of these grids can be found at:http://samples.infragistics.com/aspnet/
Please let me know if you have any questions.
Best Regards,
Petar IvanovDeveloper Support EngineerInfragistics, Inc.http://ko.infragistics.com/support
I expect a more technical answer. It seems the iterations on the client side through the grid's objects hierarchy is very slow. Only the line "grid.Rows.getRow(i)." take unacceptable time to evaluate.
Thank you for your reply.
There are multiple discussions on UltraWebGrid performance in IE. I would suggest that you take a look at the following ones for more information and suggestions:
https://ko.infragistics.com/community/forums/f/retired-products-and-controls/4925/ultrawebgrid-performance-is-degraded-on-ie-compared-to-firefox
https://ko.infragistics.com/community/forums/f/retired-products-and-controls/10840/webgrid-sorting-loading-time-in-ie-vs-firefox
Feel free to contact me if you have any questions.
Petar IvanovDeveloper Support EngineerInfragistics, Inc.https://ko.infragistics.com/support
I've rewrite the script function to use only HTML DOM instead of Infragistics DOM and the iteration through the entire rows collections completes in 1-2 secs.
Also noticed the built in script event handlers mousemove and mouseover make sometimes the grid less responsive for couple of secs.
If you can provide me with some sample illustrating the issues you have described I would be glad to investigate them. Feel free to contact me with any additional questions.
The sample is already in the post no. 1. On the client side the attemps to get references to rows as Ingragistics objects like "grid.Rows.getRow(i)" take to much time if there are a lot of data bound in the grid.
I am attaching a sample using version 10.3 which uses a button to iterate through the grid rows and change each cell's value. An alert is displayed at the end of the client side handler with the number of miliseconds it took to iterate through the rows so that you can see how long it is taking to iterate through the rows. Note that this grid has only its basic features enabled and is bound to a datatable.
I know this is a very old thread; however, I'm having a similar problem. Did you ever come up with a solution?
razvan - were you able to speed the performance for IE by changing the way the rows are iterated? I am having the same issue, Firefox 5 or 6 seconds - IE times out. My whole app is already set to for IE into compatibility mode. I do have some other grids that process 2K records in 5 or 6 seconds in IE so I will be looking into the way those grids populate and loop. Any info would be great if you have any. Don't you just love the support on these grids...
After some more tests, there is one obvious conclusion, there is a problem in the way the Infragistics DOM is internally manipulated. As I mentioned in the first post, the problem is only for IE browser and only for the first iteration. In the Firefox the iterations are very fast.
Thank you very much for your feedback. I've tested your sample code and the iteration took 22 seconds. This is happening only for the first time I click the button. For any other iteration the amount of time I got is 8 seconds. Since only first time the amount of time is much bigger, maybe there are some objects intializations or something that occurs at the first call of objects.
I'll look forward for some improvements.
Best regards,
Please do not hesitate to contact me if you need further assistance.