Hi,
i've setup an esDataSource with Gridview. I've set Autopaging and Autosorting to true on both the datasource and the gridview. I receive the following error:
ORA-30485: missing ORDER BY expression in the window specification
If I set Autopaging to false, it does work. So my guess is something is going wrong with Autopaging?
Partial Public Class _Default Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then Dim vo As New BLL.ViewPnm vo.Query.es.CountAll = True vo.Query.es.CountAllAlias = "Count" If vo.Query.Load() Then Me.EsDataSource1.TotalRowCount = vo.GetColumn("Count") End If End If End Sub Private Sub EsDataSource1_esSelect(ByVal sender As Object, ByVal e As EntitySpaces.Web.esDataSourceSelectEventArgs) Handles EsDataSource1.esSelect Dim coll As New BLL.ViewPnmCollection e.Collection = coll End Sub End Class
Regards, Scott Schecter EntitySpaces | Blog | Twitter
We have the 2009 version installed. But for some quick (how ironic, the entire workflow is faster with the older mygeneration + es solution riiiiight? :-P) solutions i'm still working with 2008.1.927.0
Anyway, paging should work even in the older release..? I don't want to be an annoying customer or anything, just let me know if it's harder for you to check what i'm doing wrong than it is for me to start using 2009...
I've added: query.OrderBy(query.Pn.Ascending) in the esSelect event. This does solve the Oracle error. But the gridview only shows the first-page-records, on every page.
Also, hard-coding the sort breaks the gridview sort right?
if (e.SortItems == null) { employees.Query.OrderBy(employees.Query.EmployeeID.Ascending); }
EntitySpaces | Twitter | BLOG | Please honor our Software License
I understand that there needs to be some order. However my solution hard-coded the sortorder, no matter which headercell you click. This probably was the root of the error (not error, but every page showing the same data).
Anyway, Scott's solution works.. Thanks!