By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,319 Members | 2,361 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,319 IT Pros & Developers. It's quick & easy.

Need some ideas to selectively fetch data via object data source or cache...

P: n/a
Hi,
I have a 3 tier ASP.Net app for a handheld which needs to fetch
orders from database via a DAL and populate it in a gridview using
objectdatasource. In the search page I have a few parameters and when
the search button is clicked I am sending those parameters via query
string ( I need to do this since my app will run in a handheld which
has certain restrictions). In the order list page, I am passing those
parameters to the DAL as queryparameters. Once I fetch the data from
DAL, I am populating the data on the datagrid.
Now, once the data is displayed, when the user selects a row I am
pointing them to a separate "edit" page, where they can edit several
fields corresponding to that row (not all of them will be displayed in
the gridview, so gridview in place editing can not be done) and when
the user hits save, I need to pass those values back to the "order
list" page where the gridview is displayed. Now once they redirected
back to the gridview page, I dont want the object data source to fetch
the data again from database but use the data already I am caching in
that page. Is this even possible? Since we have everything done
declaratively, how do I even selectively bind the gridview to the
cached data in one case vs. getting the data from database in the other
case.
I know, instead of decalratively adding parameters , I can also add
them in the page _load using ObjectDataSource1.SelectParameters.Add.
But how do I let the code to get the data from database in one case and
let the data from cache bind back to the gridview in the other case?
Any help would be very much appreciated.
Thanks
-Siva

Apr 24 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Rebind. What if you have a concurrency violation? Let the backend handle
that, and take the db hit again

Jeff
"Siva" <si*****@yahoo.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
Hi,
I have a 3 tier ASP.Net app for a handheld which needs to fetch
orders from database via a DAL and populate it in a gridview using
objectdatasource. In the search page I have a few parameters and when
the search button is clicked I am sending those parameters via query
string ( I need to do this since my app will run in a handheld which
has certain restrictions). In the order list page, I am passing those
parameters to the DAL as queryparameters. Once I fetch the data from
DAL, I am populating the data on the datagrid.
Now, once the data is displayed, when the user selects a row I am
pointing them to a separate "edit" page, where they can edit several
fields corresponding to that row (not all of them will be displayed in
the gridview, so gridview in place editing can not be done) and when
the user hits save, I need to pass those values back to the "order
list" page where the gridview is displayed. Now once they redirected
back to the gridview page, I dont want the object data source to fetch
the data again from database but use the data already I am caching in
that page. Is this even possible? Since we have everything done
declaratively, how do I even selectively bind the gridview to the
cached data in one case vs. getting the data from database in the other
case.
I know, instead of decalratively adding parameters , I can also add
them in the page _load using ObjectDataSource1.SelectParameters.Add.
But how do I let the code to get the data from database in one case and
let the data from cache bind back to the gridview in the other case?
Any help would be very much appreciated.
Thanks
-Siva

Apr 24 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.