| Issue 58: | Bug in EntityGridView | |
| 5 people starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem? 1. Set AllowMultiColumnSorting property to true 2. Set DefaultSortColumnName property to any field 3. Set DefaultSortDirection property to Descending What is the expected output? What do you see instead? This throw an exception: Incorrect syntax near the keyword 'DESC'. What version of .netTiers and CodeSmith are you using? i'm using rev744 Please provide any additional information below. Is generated a wrong orderby clause like this: '[AnyField] DESC DESC' |
|
,
Aug 20, 2008
What is happening here is that the orderby clause received at the second time you visit the entity display list aspx, will be populated from the gridviewsearchpanelstate where a orderby clause was persisted and will try to construct the orderby over it. Example: 1st time >> [AnyField] DESC 2nd time >> [AnyField] [AnyField] DESC DESC and so on... The error seems to be on the way it is creating the orderby clause with what is in the viewstate of the gridviewsearchpanelstate. Hope this helped clarifying the issue :) Regards, DiegoGravi |
|
,
Nov 30, 2008
Could you guys try the following fix and let me know if it works:
protected string ModifySortExpression(string[] sortColumns, string
sortExpression)
{
string ascSortExpression = sortExpression;
string descSortExpression = sortExpression;
if(!sortExpression.Contains("ASC"))
ascSortExpression = String.Concat(sortExpression, " ASC ");
if(!sortExpression.Contains("DESC"))
descSortExpression = String.Concat(sortExpression, " DESC ");
inside of EntityGridView.cs.cst
Status: Accepted
Owner: bniemyjski |
|
,
Jan 13, 2009
I get the same error! |
|
,
Feb 02, 2009
palegra, Did you update the template with the code I posted? -Blake |
|
,
Feb 04, 2009
Yes! |
|
,
May 25, 2009
(No comment was entered for this change.)
Owner: ---
Labels: -Priority-Medium Priority-High |
|
,
May 25, 2009
(No comment was entered for this change.)
Labels: Platform-SQL
|
|
|
|