Hi
The server side sorting functionality in my listGrid is breaking mainly because I do not know how to force the defaultOrderClause to use the fieldName (the name attribute specified against my field definition in the ds.xml) instead of the tableName and nativeName attributes for that field.
My query is something like this
my field is defined as
<field name="STUDNAME" type="text" title="Student Name" tableName="S" nativeName="STUD_NAME"/>
I use the defaultWhereClause with this field and get
S.STUD_NAME IN ('AAA','BBB'). So my filtering works fine. But the sorting fails since it puts ORDER BY S.STUD_NAME. How do I get it to put ORDER BY STUDNAME instead.
My actual query is much more complicated and I need to use the defaultWhereClause with the tableName,nativeName pair. My only worry is how do I force the orderWhereClause to take the fieldName instead of the tableName,nativeName pair
The server side sorting functionality in my listGrid is breaking mainly because I do not know how to force the defaultOrderClause to use the fieldName (the name attribute specified against my field definition in the ds.xml) instead of the tableName and nativeName attributes for that field.
My query is something like this
Code:
SELECT * FROM( SELECT S.STUD_NAME AS STUDNAME FROM STUDENT S WHERE S.STUD_NAME IN ('AAA','BBB') ) ORDER BY STUDNAME
<field name="STUDNAME" type="text" title="Student Name" tableName="S" nativeName="STUD_NAME"/>
I use the defaultWhereClause with this field and get
S.STUD_NAME IN ('AAA','BBB'). So my filtering works fine. But the sorting fails since it puts ORDER BY S.STUD_NAME. How do I get it to put ORDER BY STUDNAME instead.
My actual query is much more complicated and I need to use the defaultWhereClause with the tableName,nativeName pair. My only worry is how do I force the orderWhereClause to take the fieldName instead of the tableName,nativeName pair
Comment