New Posts New Posts RSS Feed: How to control the fetch command of the aspDatasource
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

How to control the fetch command of the aspDatasource

 Post Reply Post Reply
Author
alexei View Drop Down
Newbie
Newbie


Joined: 14-Apr-2009
Location: Curaçao
Posts: 1
Post Options Post Options   Quote alexei Quote  Post ReplyReply Direct Link To This Post Topic: How to control the fetch command of the aspDatasource
    Posted: 14-Apr-2009 at 9:02am

Is it possible to control the fetch command of the ASPdatasource. I have the following scenario.

 
Aspdatasource.
Devexpress grid(with a dropdownlist).
detailview(with controls and dropdownlist)
 
The problem is that when you change a value of the dropdown it fires a postback, this postback triggers the fetch command of the aspdatasource, and you can imagine what will happen, the value of the dropdown will "reset" it self the value that the datasource has brought, so my work around is, that when i change the value of the dropdown i'll store it into the session and after the postback i will change the dropdownlist value again to what the user has selected. This i do by searching the controlcollection for the control and when found I'll set the value that i stored in session) and then i can do an update(the Detailview update command).
 
It is the same when you use a button. because the button fires a postback no matter what. So i have to use the session as an alternative to store what the user changes and after the postback go through the page control and set the value for the controls, it is pretty anoying. And it will get difficult when i need to do it for the dropdownlist that is in a gridview row.
 
If i could control the aspDatasource to not fetch everytime, It would be a good solution, it would be great if the datasource could have a aspdatasource.Select() method like .net datasets to trigger it when you want it.
 
it is a AJAX webapplication,
 
I wonder that anybody ran into this scenario and what was their solution
 
 
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 14-Apr-2009 at 2:16pm
The AspDataSource does not control or initiate the fetch (i.e., "select") command of the Web Control it is bound to.  Instead, it dutifully responds to the select command and returns the entities for which it was asked.  To change this behavior, I would suggest that you talk to Tech Support at Developer Express.  They may know a way to manipulate or control the behavior of the grid.

Edited by davidklitzke - 14-Apr-2009 at 2:16pm
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down