jQuery UI Widgets › Forums › Grid › Grid with row details slow to load with IE10
Tagged: grid, row details
This topic contains 6 replies, has 2 voices, and was last updated by jim 11 years, 5 months ago.
-
Author
-
Using the grid with row details is slow to load in IE10. The grid takes more than 10 seconds to load in IE10. The grid loads in 3 seconds with Chrome, Firefox, Safari, and Opera.
If ‘rowdetails: false’, IE loads in around 3 seconds. If ‘rowdetails: true’. It takes 10+ seconds. Also, if most of the ‘columns’ section are commented out the grid loads quickly, taking around 3 seconds.
It looks like there’s an issue with IE because the other browsers are loading quickly, but IE loads slowly.
Thanks for your help solving this issue,
Jim———————————————————————————————————–
The code looks like: var source = { datatype: "json", datafields: [ { name: 'InputDate', type: "date"}, { name: 'Phone', type: "string" }, { name: 'Website', type: 'string' }, { name: 'CompanyAddress', type: 'string' }, { name: 'CompanyCity', type: "string" }, { name: 'CompanyState', type: "string" }, { name: 'CompanyZip', type: "string" }, { name: 'CompanyCountry', type: "string" } ], pagenum: 1, pagesize: 100, //pager: function (pagenum, pagesize, oldpagenum) { //}, url: url, data: { featureClass: "P", style: "full", maxRows: 50 } }; //Create row details var initrowdetails = function (index, parentElement, gridElement, datarecord) { var tabsdiv = null; tabsdiv = $($(parentElement).children()[0]); if (tabsdiv != null) { //information = tabsdiv.find('.information'); //HTML root of row details var container = $(''); //container.appendTo($(information)); container.appendTo($(tabsdiv)); //Add divs to row detail layout var header = $(''); var leftcolumn = $(''); var rightcolumn = $(''); var imagesrow = $(''); var lowerLanding = $(''); var loadSource = '@Url.Content("~/Content/resources/loader3.gif")'; var lowerDescription = $('
'); container.append(header); container.append(leftcolumn); //Build and populate row detail var headertext = "" + datarecord.utmcontent + ""; header.append(headertext); //left div var datetime = "Date: " + $.jqx.dataFormat.formatdate(datarecord.InputDate, 'MM/dd/yyyy h:mm:ss tt') + ""; leftcolumn.append(datetime); } }; //Grid definition----------------------------------------------------------------------------------------- $("#jqxgrid").jqxGrid( { rowdetails: true, width: '99%', height: 600, source: dataAdapter, theme:localtheme, filterable: true, sortable: true, autoshowfiltericon: false, pageable: true, pagesizeoptions: ['100', '200','300','400','500'], altrows: true, columnsresize: true, rowdetailstemplate: { rowdetails: "", rowdetailsheight: 350 }, ready: function () { }, columns: [ //Define grid columns { text: 'Date/Time', datafield: 'InputDate', minwidth: 140, cellsalign: 'left', cellsformat: 'MM/dd/yyyy h:mm:ss tt', cellsrenderer: function(row, column, value) { column = $("#jqxgrid").jqxGrid('getcolumn', column); if (column.cellsformat != '') { if ($.jqx.dataFormat) { if ($.jqx.dataFormat.isDate(value)) { value = $.jqx.dataFormat.formatdate(value, column.cellsformat); } else if ($.jqx.dataFormat.isNumber(value)) { value = $.jqx.dataFormat.formatnumber(value, column.cellsformat); } } } return '' + value + ''; } }, { text: 'Email Address', datafield: 'utmcontent', minwidth: 150, cellsrenderer: emailrenderer, cellsalign: "center" }, { text: 'Web Site', datafield: 'Website', minwidth: 180, cellsrenderer: linkrenderer, cellsalign: "left" }, { text: 'Phone', datafield: 'Phone', minwidth: 100, cellsrenderer: cellsrenderer, cellsalign: "left" }, { text: 'Address', datafield: 'CompanyAddress', minwidth: 200, cellsrenderer: cellsrenderer, cellsalign: 'left' }, { text: 'City', datafield: 'CompanyCity', minwidth: 100, cellsrenderer: cellsrenderer, cellsalign: 'left' }, { text: 'State/Prov/Reg', datafield: 'CompanyState', minwidth: 130, cellsrenderer: cellsrenderer, cellsalign: 'left' }, { text: 'Zip', datafield: 'CompanyZip', minwidth: 100, cellsrenderer: cellsrenderer, cellsalign: 'left' }, { text: 'Country', datafield: 'CompanyCountry', minwidth: 100, cellsrenderer: cellsrenderer, cellsalign: "left" } ]JQWidgets 2.8.3 and JQuery 1.9.0 libraries are being used.
IE9 is tested ok. 4 seconds loading.
Hi,
We cannot reproduce your issue with the provided code as we cannot debug where the problem is coming from. If you wish us to test your scenario, then please send a complete sample to support@jqwidgets.com
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Here are load times for various browsers. IE10 is taking a lot longer than the other browsers.
Browser Load times(sec)
Chrome 3
Firefox 4
Safari 4
IE10 20
IE9 4Hi,
Thanks for sharing that, but we will not be able to help you if we cannot test your scenario. The Loading time in IE10 in our samples with Nested Grids and Row Details is OK. The Row Details sample with IE10 takes ~350ms on my side. Please, send a small sample(web page) to support@jqwidgets.com which demonstrates your scenario and we will test it.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Here’s a scenario where IE10 takes twice as long to load as FireFox… If the paging is removed the IE load speeds up. May be other causes also. I’ll send a copy of this to support as well…
“~/Scripts/jqwidgets/jqxcore.js”,
“~/Scripts/jqwidgets/jqxdata.js”,
“~/Scripts/jqwidgets/jqxbuttons.js”,
“~/Scripts/jqwidgets/jqxscrollbar.js”,
“~/Scripts/jqwidgets/jqxlistbox.js”,
“~/Scripts/jqwidgets/jqxdropdownlist.js”,
“~/Scripts/jqwidgets/jqxmenu.js”,
“~/Scripts/jqwidgets/jqxgrid.js”,
“~/Scripts/jqwidgets/jqxgrid.filter.js”,
“~/Scripts/jqwidgets/jqxgrid.sort.js”,
“~/Scripts/jqwidgets/jqxgrid.pager.js”,
“~/Scripts/jqwidgets/jqxgrid.selection.js”,
“~/Scripts/jqwidgets/jqxpanel.js”,
“~/Scripts/jqwidgets/jqxcheckbox.js”,
“~/Scripts/jqwidgets/gettheme.js”,
“~/Scripts/jqwidgets/jqxdata.export.js”,
“~/Scripts/jqwidgets/jqxgrid.export.js”,
“~/Scripts/jqwidgets/jqxtabs.js”,
“~/Scripts/jqwidgets/jqxwindow.js”,
“~/Scripts/jqwidgets/jqxgrid.columnsresize.js”,
“~/Scripts/jqwidgets/jqxgrid.columnsresize.js”,
“~/Scripts/jqwidgets/jqxgrid.export.js”,
“~/Scripts/jqwidgets/jqxgrid.storage.js”,
“~/Scripts/jqwidgets/jqxdata.export.js”$(document).ready(function () {
//Initialize Grid
WidgetRun();//Initialize Column window
gridColumnWindow.init();
});//Grid————————————–
function WidgetRun() {
try {
var localtheme = ‘base’;//URLs for ajax calls, use commented out code for paging
var data = new Array();
var inputDate = [“12/2/2003”, “12/12/2013”, “1/2/2013”, “12/12/2013”, “12/2/2003”, “12/2/2012”, “12/12/2013”, “2/2/2013”, “1/2/2013”];
var firstNames = [“Nancy”, “Andrew”, “Janet”, “Margaret”, “Steven”, “Michael”, “Robert”, “Laura”, “Anne”];
var lastNames = [“Davolio”, “Fuller”, “Leverling”, “Peacock”, “Buchanan”, “Suyama”, “King”, “Callahan”, “Dodsworth”];
var titles = [“Sales Representative”, “Vice President, Sales”, “Sales Representative”, “Sales Representative”, “Sales Manager”, “Sales Representative”, “Sales Representative”, “Inside Sales Coordinator”, “Sales Representative”];
var titleofcourtesy = [“Ms.”, “Dr.”, “Ms.”, “Mrs.”, “Mr.”, “Mr.”, “Mr.”, “Ms.”, “Ms.”];
var birthdate = [“08-Dec-48”, “19-Feb-52”, “30-Aug-63”, “19-Sep-37”, “04-Mar-55”, “02-Jul-63”, “29-May-60”, “09-Jan-58”, “27-Jan-66”];
var hiredate = [“01-May-92”, “14-Aug-92”, “01-Apr-92”, “03-May-93”, “17-Oct-93”, “17-Oct-93”, “02-Jan-94”, “05-Mar-94”, “15-Nov-94”];
var address = [“507 – 20th Ave. E. Apt. 2A”, “908 W. Capital Way”, “722 Moss Bay Blvd.”, “4110 Old Redmond Rd.”, “14 Garrett Hill”, “Coventry House”, “Miner Rd.”, “Edgeham Hollow”, “Winchester Way”, “4726 – 11th Ave. N.E.”, “7 Houndstooth Rd.”];
var city = [“Seattle”, “Tacoma”, “Kirkland”, “Redmond”, “London”, “London”, “London”, “Seattle”, “London”];
var postalcode = [“98122”, “98401”, “98033”, “98052”, “SW1 8JR”, “EC2 7JR”, “RG1 9SP”, “98105”, “WG2 7LT”];
var country = [“USA”, “USA”, “USA”, “USA”, “UK”, “UK”, “UK”, “USA”, “UK”];
var homephone = [“(206) 555-9857”, “(206) 555-9482”, “(206) 555-3412”, “(206) 555-8122”, “(71) 555-4848”, “(71) 555-7773”, “(71) 555-5598”, “(206) 555-1189”, “(71) 555-4444”];
var notes = [“Education includes a BA in psychology from Colorado State University in 1970. She also completed ‘The Art of the Cold Call.’ Nancy is a member of Toastmasters International.”,
“Andrew received his BTS commercial in 1974 and a Ph.D. in international marketing from the University of Dallas in 1981. He is fluent in French and Italian and reads German. He joined the company as a sales representative, was promoted to sales manager in January 1992 and to vice president of sales in March 1993. Andrew is a member of the Sales Management Roundtable, the Seattle Chamber of Commerce, and the Pacific Rim Importers Association.”,
“Janet has a BS degree in chemistry from Boston College (1984). She has also completed a certificate program in food retailing management. Janet was hired as a sales associate in 1991 and promoted to sales representative in February 1992.”,
“Margaret holds a BA in English literature from Concordia College (1958) and an MA from the American Institute of Culinary Arts (1966). She was assigned to the London office temporarily from July through November 1992.”,
“Steven Buchanan graduated from St. Andrews University, Scotland, with a BSC degree in 1976. Upon joining the company as a sales representative in 1992, he spent 6 months in an orientation program at the Seattle office and then returned to his permanent post in London. He was promoted to sales manager in March 1993. Mr. Buchanan has completed the courses ‘Successful Telemarketing’ and ‘International Sales Management.’ He is fluent in French.”,
“Michael is a graduate of Sussex University (MA, economics, 1983) and the University of California at Los Angeles (MBA, marketing, 1986). He has also taken the courses ‘Multi-Cultural Selling’ and ‘Time Management for the Sales Professional.’ He is fluent in Japanese and can read and write French, Portuguese, and Spanish.”,
“Robert King served in the Peace Corps and traveled extensively before completing his degree in English at the University of Michigan in 1992, the year he joined the company. After completing a course entitled ‘Selling in Europe,’ he was transferred to the London office in March 1993.”,
“Laura received a BA in psychology from the University of Washington. She has also completed a course in business French. She reads and writes French.”,
“Anne has a BA degree in English from St. Lawrence College. She is fluent in French and German.”];for (var z = 0; z < 3000; z++) {
var k = 0;
for (var i = 0; i < firstNames.length; i++) {
var row = {};
row["InputDate"] = inputDate[k];
row["content"] = lastNames[k];
row["camp"] = titles[k];
row["source"] = titleofcourtesy[k];
row["companyname"] = birthdate[k];
row["Phone"] = hiredate[k];
row["Website"] = address[k];
row["CompanyAddress"] = city[k];
row["CompanyCity"] = postalcode[k];
row["CompanyState"] = country[k];
row["CompanyZip"] = homephone[k];
row["CompanyCountry"] = country[k];row["IPAddress"] = lastNames[k];
row["location"] = lastNames[k];
row["CityG"] = lastNames[k];
row["gRegion"] = lastNames[k];
row["gCountry"] = lastNames[k];
row["organization"] = lastNames[k];
row["Industry"] = lastNames[k];
row["Revenue"] = lastNames[k];
row["Employees"] = lastNames[k];
row["thePage"] = lastNames[k];
row["LastVisit"] = lastNames[k];
data[z] = row;
k++;
}
}
//Define report source structure, parameters
var source =
{
localdata: data,
datatype: "array",
pagesize: 100
};
//var source =
//{
// datatype: "json",
// datafields: [
// { name: 'emailpageviewid' },
// { name: 'InputDate', type: "date" },
// { name: 'InputDateString', type: "string" },
// { name: 'content', type: 'string' },
// { name: 'camp', type: 'string' },
// { name: 'source', type: 'string' },
// { name: 'companyname', type: "string" },
// { name: 'Phone', type: "string" },
// { name: 'Website', type: 'string' },
// { name: 'CompanyAddress', type: 'string' },
// { name: 'CompanyCity', type: "string" },
// { name: 'CompanyState', type: "string" },
// { name: 'CompanyZip', type: "string" },
// { name: 'CompanyCountry', type: "string" },
// { name: 'IPAddress', type: "string" },
// { name: 'location', type: "string" },
// { name: 'CityG', type: "string" },
// { name: 'gRegion', type: "string" },
// { name: 'gCountry', type: "string" },
// { name: 'organization', type: "string" },
// { name: 'Industry', type: "string" },
// { name: 'Revenue', type: "float" },
// { name: 'Employees', type: "float" },
// { name: 'thePage', type: "string" },
// { name: 'LastVisit', type: "date" }
// ],// pagenum: 1,
// pagesize: 100,
// pager: function (pagenum, pagesize, oldpagenum) {// },
// url: url,
// data: {
// featureClass: "P",
// style: "full",
// maxRows: 50
// }
//};//Create row details
var initrowdetails = function (index, parentElement, gridElement, datarecord) {
var tabsdiv = null;
var information = null;
tabsdiv = $($(parentElement).children()[0]);
if (tabsdiv != null) {
information = tabsdiv.find('.information');
//HTML root of row details
var container = $('‘);
container.appendTo($(information));//Add divs to row detail layout
var header = $(‘‘);
var leftcolumn = $(‘‘);
var rightcolumn = $(‘‘);
var imagesrow = $(‘‘);
var lowerLanding = $(‘‘);
var loadSource = ‘@Url.Content(“~/Content/resources/loader3.gif”)’;
var lowerDescription = $(‘‘);
container.append(header);
container.append(leftcolumn);
container.append(rightcolumn);
container.append(lowerLanding);
container.append(lowerDescription);
container.append(imagesrow);//Build and populate row detail
var headertext = “” + datarecord.content + ““;
header.append(headertext);//left div
var datetime = “Date: ” + datarecord.InputDateString + ““;
leftcolumn.append(datetime);
var campaign = “Campaign: ” + datarecord.camp + ““;
leftcolumn.append(campaign);
var sender = “Source | ESP: ” + datarecord.source + ““;
leftcolumn.append(sender);
var IPAddress = “IP Address: ” + datarecord.IPAddress + ““;
leftcolumn.append(IPAddress);
var previousVisit = “Previous Visit: ” + $.jqx.dataFormat.formatdate(datarecord.LastVisit, ‘MM/dd/yyyy h:mm:ss tt’) + ““;
leftcolumn.append(previousVisit);
var parentcompany = “Parent Company: ” + datarecord.companyname + ““;
leftcolumn.append(parentcompany);//right div
var website = “Website: ” + datarecord.Website + ““;
$(rightcolumn).append(website);
var fullAddress = datarecord.CompanyAddress;
if (datarecord.CompanyCity !== “”) {
fullAddress = fullAddress + “, ” + datarecord.CompanyCity;
}
if (datarecord.CompanyState !== “”) {
fullAddress = fullAddress + “, ” + datarecord.CompanyState;
}
if (datarecord.CompanyZip !== “”) {
fullAddress = fullAddress + “, ” + datarecord.CompanyZip;
}
if (datarecord.CompanyCountry !== “”) {
fullAddress = fullAddress + “, ” + datarecord.CompanyCountry;
}
var address = “Address: ” + fullAddress + ““;
$(rightcolumn).append(address);
var phone = “Phone: ” + datarecord.Phone + ““;
$(rightcolumn).append(phone);
var industry = “Industry: ” + datarecord.Industry + ““;
$(rightcolumn).append(industry);
var revenue = ‘Revenue: ‘ + $.jqx.dataFormat.formatnumber(datarecord.Revenue, ‘c0’) + ‘‘;
$(rightcolumn).append(revenue);
var employees = ‘Employees: ‘ + $.jqx.dataFormat.formatnumber(datarecord.Employees, ‘n’) + ‘‘;
$(rightcolumn).append(employees);//images div
var photo = $(““);
var image = $(““);
var imgurl = ‘@Url.Content(“~/Images/vt/email_forward.png”)’;
var bodyRowData = “Company Name: ” + datarecord.companyname + “\r\n” +
“Web Site: ” + datarecord.Website + “\r\n” +
“Address: ” + datarecord.CompanyAddress + “\r\n” +
“City: ” + datarecord.CompanyCity + “\r\n” +
“State/Prov/Reg: ” + datarecord.CompanyState + “\r\n” +
“Country: ” + datarecord.CompanyCountry + “\r\n” +
“IP Address: ” + datarecord.IPAddress + “\r\n” +
“GEO City: ” + datarecord.CityG + “\r\n” +
“GEO State/Prov/Reg: ” + datarecord.gRegion + “\r\n” +
“GEO Country: ” + datarecord.gCountry + “\r\n” +
“Phone: ” + datarecord.Phone + “\r\n” +
“Email Address: ” + datarecord.content + “\r\n” +
“Industry: ” + datarecord.Industry + “\r\n”;
var img = $(‘‘);
image.prepend(img);
image.appendTo(photo);imagesrow.append(photo);
photo = $(““);
image = $(““);
imgurl = ‘@Url.Content(“~/Images/vt/dcom_icon.png”)’;
img = $(‘‘);
image.prepend(img);
image.appendTo(photo);
imagesrow.append(photo);photo = $(“
“);
image = $(““);
imgurl = ‘@Url.Content(“~/Images/vt/lin_icon.png”)’;
var companyLinkedIn = datarecord.companyname;
var newcompanyLinkedIn = companyLinkedIn.split(‘ ‘).join(‘+’);
img = $(‘‘);
image.prepend(img);
image.appendTo(photo);
imagesrow.append(photo);photo = $(“
“);
image = $(““);
imgurl = ‘@Url.Content(“~/Images/vt/twitt_icon.png”)’;
img = $(‘‘);
image.prepend(img);
image.appendTo(photo);
imagesrow.append(photo);//landing div
var landingPage = “Landing Page: ” + datarecord.thePage + ““;
$(lowerLanding).append(landingPage);//Zoominfo div
zoomInfoUrl = “api/ZoomInfo?companyName=”;
var description = “Company Description:” + “Company Info” + ““;
$(lowerDescription).append(description);
}
};//Column filters
var dataAdapter = new $.jqx.dataAdapter(source);//Grid definition—————————————————————————————–
$(“#jqxgrid”).jqxGrid(
{
width: ‘99%’,
height: ‘99%’,
source: dataAdapter,
theme: localtheme,
//6 seconds….
pageable: true,
pagesizeoptions: [‘100’, ‘200’, ‘300’, ‘400’, ‘500’],
//…………rowdetails: true,
rowdetailstemplate: { rowdetails: ““, rowdetailsheight: 350 },
ready: function () {
$(“#jqxgrid”).jqxGrid(‘showrowdetails’, 0);
},//Wire up grid row details to function
initrowdetails: initrowdetails,columns: [
//Define grid columns
{ text: ‘Date/Time’, datafield: ‘inputDate’, minwidth: 150, cellsalign: ‘center’ },
{ text: ‘Email’, datafield: ‘content’, minwidth: 150, cellsalign: ‘center’ },
{ text: ‘Company’, datafield: ‘companyname’, minwidth: 180, cellsalign: ‘left’ },
{ text: ‘Web’, datafield: ‘Website’, minwidth: 180, cellsalign: ‘left’ },
{ text: ‘Phone’, datafield: ‘Phone’, minwidth: 100, cellsalign: ‘left’ },
{ text: ‘Location’, datafield: ‘location’, minwidth: 250},
{ text: ‘Industry’, datafield: ‘Industry’, minwidth: 200, cellsalign: ‘left’ },
{ text: ‘Page’, datafield: ‘thePage’, minwidth: 200, cellsalign: ‘left’ },
{ text: ‘Detail’, datafield: ‘camp’, minwidth: 200, cellsalign: ‘left’ },
{ text: ‘Source’, datafield: ‘source’, minwidth: 150, cellsalign: ‘left’ },
{ text: ‘Address’, datafield: ‘CompanyAddress’, minwidth: 200, cellsalign: ‘left’ },
{ text: ‘City’, datafield: ‘CompanyCity’, minwidth: 100, cellsalign: ‘left’ },
{ text: ‘State’, datafield: ‘CompanyState’, minwidth: 130, cellsalign: ‘left’ },
{ text: ‘Zip’, datafield: ‘CompanyZip’, minwidth: 100, cellsalign: ‘left’ },
{ text: ‘Country’, datafield: ‘CompanyCountry’, minwidth: 100, cellsalign: ‘left’ },
{ text: ‘Address’, datafield: ‘IPAddress’, minwidth: 100},
{ text: ‘City’, datafield: ‘CityG’, minwidth: 200},
{ text: ‘State’, datafield: ‘gRegion’, minwidth: 150},
{ text: ‘Country’, datafield: ‘gCountry’, minwidth: 140},
{ text: ‘Org’, datafield: ‘organization’, minwidth: 100, cellsalign: ‘left’ },
{ text: ‘Revenue’, datafield: ‘Revenue’, minwidth: 100, cellsalign: ‘left’ },
{ text: ‘Employees’, datafield: ‘Employees’, minwidth: 100, cellsalign: ‘left’ },
{ text: ‘Date’, datafield: ‘LastVisit’, minwidth: 100, cellsalign: ‘left’ }
]
});
//End of Grid definition————————————————————————————————-//End of Widget Run—————————————————-
} catch (err) {
var txt = “There was an error on this page.\n\n”;
txt += “Error description: ” + err.message + “\n\n”;
txt += “Click OK to continue.\n\n”;
alert(txt);
}
}//Columns to use in grid, popup
var gridColumnWindow = (function () {
//Adding event listeners
//Create show window, hide window buttons//Create grid columns used window
return {
config: {
dragArea: null,
theme: null
},
init: function () {}
};
}());@*Grid*@@*Popup for ColumnList*@
Column Display List -
AuthorPosts
You must be logged in to reply to this topic.