Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
datatables [2011/03/15 10:09]
wilco add sign-off
datatables [2015/08/15 15:15] (current)
Line 117: Line 117:
             if (_tableParams.ContainsKey(DISPLAY_START))             if (_tableParams.ContainsKey(DISPLAY_START))
                 skip = (int)_tableParams[DISPLAY_START];​                 skip = (int)_tableParams[DISPLAY_START];​
-            if (_tableParams.ContainsKey(DISPLAY_START))+            if (_tableParams.ContainsKey(DISPLAY_LENGTH))
                 take = (int)_tableParams[DISPLAY_LENGTH];​                 take = (int)_tableParams[DISPLAY_LENGTH];​
  
Line 141: Line 141:
  
                 var paramExpr = Expression.Parameter(typeof(T),​ "​val"​);​                 var paramExpr = Expression.Parameter(typeof(T),​ "​val"​);​
-                var propertyExpr = Expression.Lambda<​Func<​T,​ object>>​(Expression.Property(paramExpr,​ _properties[sortcolumn]),​ paramExpr);+                var propertyExpr = Expression.Lambda<​Func<​T,​ object>>​(Expression.Convert(Expression.Property(paramExpr,​ _properties[sortcolumn]), typeof(object)), paramExpr); 
  
                 if (string.IsNullOrEmpty(sortdir) || sortdir.Equals(ASCENDING_SORT,​ StringComparison.OrdinalIgnoreCase))                 if (string.IsNullOrEmpty(sortdir) || sortdir.Equals(ASCENDING_SORT,​ StringComparison.OrdinalIgnoreCase))