I am always reluctant to use Netadvantage for ASP.NET controls when there already exist the same controls in VS2005 (i.e.: gridview, panel, tab). Although Infragistics controls are easier to use and has plenty of formatting options, the load that these controls add (JavaScript code in the resource file and styling images) push me away. I am not sure exactly how much it would increase the loading time or it would be noticeable for the user. I hope I am wrong
Thanks Chris for your suggestions.
We did implement 1(LoadOnDemand), 3, 4, 5, 6, and the performance is still poor on IE, but working better in Firefox.
Loading the data initially is not a problem, but doing a sorting takes for ever in IE.....
Ok a couple of things right out the gate.1: LoadOnDemand and/or Paging is your Friend.2: Setting your DataSource at Runtime (when applicable) using a asp:SqlDataSource will save a lot of performance.3: Set your columns up in the page aspx file not codeBehindIE: <igtbl:UltraGridColumn Hidden="false" Width="20" BaseColumnName="MyDataField" HeaderText="MyDataText" IsBound="True" Key="MyDataField" />4: Use the webGrid_InitializeLayout event to setup your fields (ie: hide, center, change caption etc.) that is if you need to do itdynamicly.5: Try and prepare your data ahead of time from your storedProcedure (ie: your edit field has <a href etc. in it) so try and just modifythe storedProcedure/Select Statement to just output it for you. If you cannot do that then just use the webGrid_InitializeRow event to fix the cell like so:e.Row.Cells(1).Text = "<a href..."
6: Turn off your ViewState The main reason your page is so slow is because it is 1.35 MB and both FF and IE are choking on this across the wire getting script timeouts etc. your viewstate alone is over 500k... if you need your viewstate for some reason (which 90% of the time you don't) then offload it to the server.
All of the above factors play into sorting as well. so until you resolve the "base" issues there is no way it is going to work the way you want it to, for that matter no grid is going to work like that.
BTW Friendly tip hide all the username/password/email information for your test unless "all" of those are test accounts.
We were populating a DataTable because our BL returns a generic collection IList, and we did not find a way to hide fields that we do not want to display in the datagrid when using the generic collection. If there is way to hide fields from the generic collection in the datagrid please let me know.
For testing purposes we just removed the code that is looping to populate the datatable, and we kept only the generic collection.
I have an aspx file on our dev server where you can test our implementation: http://42.autodev.2020.net/test/User/list.aspx
Sorting using Firefox, time execution is acceptable
Sorting using IE, time execution is not acceptable
Thanks for your support!
Ouch... Why are you looping through all your records?
I just got some feedback from my development team, and the performance problem is occuring only in IE when we use the grouping functionality, sorting, and filtering. The datagrid is working fine in Firefox.
Actually, sorting 1k rows takes less than 5 secs in Firefox, and more than 1 minute in IE.
Here is the code used:
IList<Tech2020.w2020net.Model.User> users; DataTable dt = new DataTable();
CreateColumn(dt, "System.String", "Edit");
CreateColumn(dt, "System.Int32", "ID");
CreateColumn(dt, "System.String", "FirstName");
CreateColumn(dt, "System.String", "LastName");
CreateColumn(dt, "System.String", "Email");
CreateColumn(dt, "System.Boolean", "Member");
CreateColumn(dt, "System.Boolean", "Active");
CreateColumn(dt, "System.String", "LastLogin");
CreateColumn(dt, "System.String", "EditedOn");
users = bal.GetUsers(-1); // status 0 == active And 1 == deleted in the ektron system
foreach (Tech2020.w2020net.Model.User user in users)
{
DataRow row;
row = dt.NewRow();
row["Edit"] = "<a href=\"Edit.aspx?userID=" + user.ID.ToString() + "&KeepThis=true&TB_iframe=true&height=500&width=650&modal=true\" class=\"thickbox\">Edit</a>";
row["ID"] = user.ID;
row["FirstName"] = user.FirstName;
row["LastName"] = user.LastName;
row["Email"] = user.Email;
row["Member"] = user.MembershipUser;
row["Active"] = user.Active;
row["LastLogin"] = user.DateLastLogin;
row["EditedOn"] = user.DateModified;
dt.Rows.Add(row);
}
UltraWebGrid1.DataSource = dt;
UltraWebGrid1.DataBind();