How to perform select on web page callback when UseViewstate=true ?

Posts   
 
    
Wally
User
Posts: 285
Joined: 29-Aug-2007
# Posted on: 18-Jan-2008 21:58:29   

Hello,

I'd like to use the viewstate for the LLBLGenDatasource. I set EnableViewState=True. The problem is when I use it and my page is on callback (user select a combo that should feed new values for another combo) then the call to "LLBLGenDataSource.Select" do not call "PerformSelect" and I can't add my filter. If I set EnableViewState=False, it works fine. Why this beahvior ?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 19-Jan-2008 03:21:34   

Hello Wally,

Could you please specify more info (version, RTL version, code snippet, etc.)? http://llblgen.com/TinyForum/Messages.aspx?ThreadID=7722

Anyway, I think you also can use LLBLGen SelectParameters (see docs).

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39908
Joined: 17-Aug-2003
# Posted on: 20-Jan-2008 14:15:29   

Indeed. When Select parameters are specified, the state is ignored and the select is re-done with the parameter values.

Frans Bouma | Lead developer LLBLGen Pro
Wally
User
Posts: 285
Joined: 29-Aug-2007
# Posted on: 21-Jan-2008 17:57:54   

You closed the case ???

Why calling the "PerformSelect" on initial page load and not when I call ".Select()" on Postback (for example when a user pressed a button).

It should have a standard behavior either with or without "Select parameters" ???

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 22-Jan-2008 10:38:48   

Try to set the datasource.Refetch = true;

Wally
User
Posts: 285
Joined: 29-Aug-2007
# Posted on: 22-Jan-2008 15:17:25   

Thanks Walaa,

It should help! I will probably solve my issue.

But I think I will get back with some comments. (For example... why it is not the default behavior ? I think it would be nice to have a behavior similar to Microsoft Datasource.)

Frans took note about adding a sort clause property into the LLBLGenDatasource (for a future release). With that added property it would still be better too­!

I will try your suggestion soon, near thursday.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 23-Jan-2008 09:52:06   

I'll close this thread for now. Post a reply to re-open it.