Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> Paging using ASPxGridView
 

Pages: 1 2 3 4
LLBLGen Pro Runtime Framework
Paging using ASPxGridView
Page:4/4 

  Print all messages in this thread  
Poster Message
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
38051 posts
# Posted on: 17-May-2008 11:21:27.  
I think I have a workaround.
(I haven't tested it, it's theory, but it might work).

The ASPxGridView has an event: PageIndexChanged. Bind a handler to that event. When that event is raised, grab the new page number and store it in the viewstate. Set the datasourcecontrol's LivePersistence property to false. Bind an event handler to PerformSelect and PerformGetDbCount. When the call comes, read the viewstate's value for the current page of the grid. Then simply fetch that page in PerformSelect (and in PerformGetDbCount, you simply fetch the db count)

It might also be simpler, if you can read the grid's current page value from the grid, when the PerformSelect event is raised, you can fetch the page's data.

There's one caveat: if the grid thinks paging isn't necessary because there are just say 10 rows in the data, it's over, but if the grid obeys at least the standard to obtain the total # of rows through the ExecuteSelect call for fetching the number of rows, it might work.

I haven't heard back from DevExpress since yesterday morning. they also didn't publish my replies to the blog entry... Anyway, if this workaround makes things at least usable for some people, you all can continue working on your projects and don't have to wait till DevExpress fixes this issue (if ever).
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
tzarger
User



Location:
Phoenix, AZ
Joined on:
14-Jun-2007 08:14:30
Posted:
87 posts
# Posted on: 17-May-2008 16:25:36.  
Otis wrote:
I haven't heard back from DevExpress since yesterday morning. they also didn't publish my replies to the blog entry... Anyway, if this workaround makes things at least usable for some people, you all can continue working on your projects and don't have to wait till DevExpress fixes this issue (if ever).


That is interesting, I responded to Julian in that thread saying I respectfully disagreed that paging was considered an "advanced" feature... My post was not added either, it seems that have shut posting to it down... That seems wrong to me. Oh well.

I will take a stab at your suggestion Frans, and post back here if it works.


  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
38051 posts
# Posted on: 19-May-2008 19:17:58.  
Good news from DevExpress! In the next minor release (2008.1.4) they're planning a feature to turn off the advanced paging/grouping stuff so the paging parameters are passed to ExecuteSelect().

Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
tzarger
User



Location:
Phoenix, AZ
Joined on:
14-Jun-2007 08:14:30
Posted:
87 posts
# Posted on: 19-May-2008 19:21:11.  
Otis wrote:
Good news from DevExpress! In the next minor release (2008.1.4) they're planning a feature to turn off the advanced paging/grouping stuff so the paging parameters are passed to ExecuteSelect().



That is excellent, the next minor release should be out soon, as they seem to release minors about every month. Let's hope it just "works' then... :-)


  Top
WayneBrantley
User



Location:
USA
Joined on:
10-Mar-2006 16:20:08
Posted:
1118 posts
# Posted on: 19-May-2008 19:48:34.  
I think that is a great step forward and will really help them in the marketplace.
SelfServicing, .Net 4.5, Web Applications, SqlServer 2014  Top
tzarger
User



Location:
Phoenix, AZ
Joined on:
14-Jun-2007 08:14:30
Posted:
87 posts
# Posted on: 19-May-2008 19:50:30.  
my only fear, they take out filtering... grouping, summaries/totaling... I can live without ... but filtering that would be a mistake.

  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
38051 posts
# Posted on: 19-May-2008 20:54:18.  
tzarger wrote:
my only fear, they take out filtering... grouping, summaries/totaling... I can live without ... but filtering that would be a mistake.

Filtering isn't done through the datasourcecontrol as in: grid -> datasourcecontrol, that's not done this way. A datasourcecontrol filters based on the SelectParameters contents, which is filled by adding parameters to that collection. It's also filtered by a filter you set in the code behind. It's not filtered by data passed from grid to the datasourcecontrol.

A filter from the grid to the datasourcecontrol only works if the datasourcecontrol is build to accept a filter from a bound control, which is the case with their IListServer implementing datasourcecontrol.
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
DvK
User



Location:
Delft (centre), Netherlands
Joined on:
22-Mar-2006 10:43:57
Posted:
292 posts
# Posted on: 19-May-2008 22:03:22.  
http://community.devexpress.com/blogs/ctodx/archive/2008/05/19/quot-paging-grid-team-paging-grid-team-quot.aspx

  Top
tzarger
User



Location:
Phoenix, AZ
Joined on:
14-Jun-2007 08:14:30
Posted:
87 posts
# Posted on: 19-May-2008 22:14:31.  
DvK wrote:
http://community.devexpress.com/blogs/ctodx/archive/2008/05/19/quot-paging-grid-team-paging-grid-team-quot.aspx


Why does Julian keep referencing LINQ paging parameters... it sounds like you would have to be using a LinqDataSource, rather than any generic datasource control... Most likely I am reading too much into it.
  Top
JulianBucknall
User



Location:

Joined on:
19-May-2008 22:50:49
Posted:
1 posts
# Posted on: 19-May-2008 22:54:31.  
tzarger wrote:
DvK wrote:
http://community.devexpress.com/blogs/ctodx/archive/2008/05/19/quot-paging-grid-team-paging-grid-team-quot.aspx


Why does Julian keep referencing LINQ paging parameters... it sounds like you would have to be using a LinqDataSource, rather than any generic datasource control... Most likely I am reading too much into it.


Dunno. For some reason the word LINQ was sticking in my mind... Sigh.


  Top
tzarger
User



Location:
Phoenix, AZ
Joined on:
14-Jun-2007 08:14:30
Posted:
87 posts
# Posted on: 19-May-2008 23:08:51.  
JulianBucknall wrote:
tzarger wrote:
DvK wrote:
http://community.devexpress.com/blogs/ctodx/archive/2008/05/19/quot-paging-grid-team-paging-grid-team-quot.aspx


Why does Julian keep referencing LINQ paging parameters... it sounds like you would have to be using a LinqDataSource, rather than any generic datasource control... Most likely I am reading too much into it.


Dunno. For some reason the word LINQ was sticking in my mind... Sigh.


:-) Better to hear that from the man himself. I'll take that as a yes that generic datasource controls will receive the paging as well. Thanks Julian.
  Top
DvK
User



Location:
Delft (centre), Netherlands
Joined on:
22-Mar-2006 10:43:57
Posted:
292 posts
# Posted on: 23-May-2008 10:16:43.  
http://community.devexpress.com/blogs/ctodx/archive/2008/05/22/paging-is-good-but-throughout-the-stack-please.aspx

  Top
tzarger
User



Location:
Phoenix, AZ
Joined on:
14-Jun-2007 08:14:30
Posted:
87 posts
# Posted on: 23-May-2008 17:43:02.  
Otis wrote:

Filtering isn't done through the datasourcecontrol as in: grid -> datasourcecontrol, that's not done this way. A datasourcecontrol filters based on the SelectParameters contents, which is filled by adding parameters to that collection. It's also filtered by a filter you set in the code behind. It's not filtered by data passed from grid to the datasourcecontrol.

A filter from the grid to the datasourcecontrol only works if the datasourcecontrol is build to accept a filter from a bound control, which is the case with their IListServer implementing datasourcecontrol.


Hi Frans, quick question, the paging in DevExpress removes the ability to group, filter, summarize, unbound events... which I understand based on what you have said here, and what Plato at DevExpress has explained as well... So in order to make it all work, you can capture the FilterExpression manually in the format of: "[Product] Like 'Test%'" ... Is there a good and easy way to use that as a select parameter with the LLBLGenProDataSource?

I know you could build your own SQL query and execute it ... just checking to see if you can think of a more type safe way to do it. Thanks so much!
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
38051 posts
# Posted on: 24-May-2008 18:55:14.  
DvK wrote:
http://community.devexpress.com/blogs/ctodx/archive/2008/05/22/paging-is-good-but-throughout-the-stack-please.aspx

I don't get the point of the post. Grouping of data through linq makes it automatically readonly data. If you want to edit the rows in the grid which have to be roundtripped to the server and db, how's that done then? Or is that 'magic' that appears to be there all of a sudden? I don't think so. But I disgress...

tzarger wrote:
Otis wrote:

Filtering isn't done through the datasourcecontrol as in: grid -> datasourcecontrol, that's not done this way. A datasourcecontrol filters based on the SelectParameters contents, which is filled by adding parameters to that collection. It's also filtered by a filter you set in the code behind. It's not filtered by data passed from grid to the datasourcecontrol.

A filter from the grid to the datasourcecontrol only works if the datasourcecontrol is build to accept a filter from a bound control, which is the case with their IListServer implementing datasourcecontrol.

Hi Frans, quick question, the paging in DevExpress removes the ability to group, filter, summarize, unbound events... which I understand based on what you have said here, and what Plato at DevExpress has explained as well... So in order to make it all work, you can capture the FilterExpression manually in the format of: "[Product] Like 'Test%'" ... Is there a good and easy way to use that as a select parameter with the LLBLGenProDataSource?

I know you could build your own SQL query and execute it ... just checking to see if you can think of a more type safe way to do it. Thanks so much!

What's that 'FilterExpression'? Is that some filter in a format defined in a generic way? Or is that DevExpress specific?

SelectParameter parameters are always field == value


Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
tzarger
User



Location:
Phoenix, AZ
Joined on:
14-Jun-2007 08:14:30
Posted:
87 posts
# Posted on: 24-May-2008 23:14:25.  
Otis wrote:
What's that 'FilterExpression'? Is that some filter in a format defined in a generic way? Or is that DevExpress specific?

SelectParameter parameters are always field == value


Yes, FilterExpression comes off the ASPxGridView ... and it give the filter as a string in that format... I was thinking you had to assign a filter value to a SelectParamter, which would mean I have to parse the string to get the key / value pair, not to mention determine the operator.
  Top
Pages: 1 2 3 4  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.