I put together a small test app using Infragistics grid, DevExpress grid, and MS webgrid (one per page).
Each page has a esDataSource configured identical.
MS Grid - displayed ok, sorted ASC every column ok, edited and successful update ok.
IG WebGrid - displayed ok, sorted ASC FirstName and LastName columns ok, does not sort EmployeeID correctly (top to bottom = 4,5,3,1,2), would not update the db after an edit (I'm pretty sure handling a different event will make this work - need to test).
Neither grid would sort a column DESC order - causes an exception:
Code:
Server Error in '/NwTraders' Application.
--------------------------------------------------------------------------------
Invalid column name 'EmployeeID DESC'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Invalid column name 'EmployeeID DESC'.
Source Error:
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
1. Add a "Debug=true" directive at the top of the file that generated the error. Example:
<%@ Page Language="C#" Debug="true" %>
or:
2) Add the following section to the configuration file of your application:
<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>
Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.
Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.
Stack Trace:
[SqlException (0x80131904): Invalid column name 'EmployeeID DESC'.]
EntitySpaces.Interfaces.esDataProvider.esLoadDataTable(esDataRequest request, esProviderSignature sig) +135
EntitySpaces.Interfaces.esDynamicQuery.Load() +184
igControls.EsDataSource1_esSelect(Object sender, esDataSourceSelectEventArgs e) +327
EntitySpaces.Web.esDataSourceView.OnSelect(esDataSourceSelectEventArgs e) +56
EntitySpaces.Web.esDataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +112
Infragistics.WebUI.UltraWebGrid.UltraWebGrid.DataBind() +721
Infragistics.WebUI.UltraWebGrid.StateChangeProcessor.ProcessSortedColumns(StateChange stateChange, UltraGridColumn column) +4009
Infragistics.WebUI.UltraWebGrid.StateChangeProcessor.ProcessChanges() +2986
Infragistics.WebUI.UltraWebGrid.UltraWebGrid.ProcessChanges(StateChanges stateChanges, Boolean fireEvents) +247
Infragistics.WebUI.UltraWebGrid.UltraWebGrid.LoadPostData(String postDataKey, NameValueCollection values) +5668
System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +408
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3776
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
The MS webgrid is similar exception.
I could not get the DevExpress webgrid to work correctly. Generates an exception on page load:
Code:
Server Error in '/NwTraders' Application.
--------------------------------------------------------------------------------
A field or property with the name 'EmployeeID' was not found on the selected datasource.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: A field or property with the name 'EmployeeID' was not found on the selected datasource.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): A field or property with the name 'EmployeeID' was not found on the selected datasource.]
DevExpress.Web.ASPxGrid.BoundColumn.GetDataControllerColumn() +352
DevExpress.Web.ASPxGrid.BoundColumn.GetFieldType() +12
DevExpress.Web.ASPxDataControls.EditorInplaceContainer.get_EditorPropertiesInternal() +38
DevExpress.Web.ASPxGrid.BoundColumn.Initialize() +45
DevExpress.Web.ASPxGrid.ASPxGrid.InitializeColumns() +36
DevExpress.Web.ASPxGrid.ASPxGrid.CreateRowList() +802
DevExpress.Web.ASPxGrid.ASPxGrid.PrerenderInternal(Boolean needRegisterScripts) +90
DevExpress.Web.ASPxGrid.ASPxGrid.OnPreRenderInternal(EventArgs e) +10
DevExpress.Web.ASPxDataControls.ASPxWebControlBase.OnPreRender(EventArgs e) +221
System.Web.UI.Control.PreRenderRecursiveInternal() +77
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
I double checked esDataSource and the grid properties and all look good. I can send aspx and code behind if you need it.
Looks like a great start. Hope this helps
Gary Hanken