469,268 Members | 1,019 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,268 developers. It's quick & easy.

DataSourceControl with multiple views and data binding order

I have created a custom DataSourceControl to interface to a search engine.
The DataSourceControl exposes multiple views of the same data. The first is
the actual search results. The other views are for information about
parametric data (i.e. this state has 4 hits, that state has 6 hits, etc.)

So far, I have almost everything working perfectly. I had to move the code
to actually execute the search up in the the DataSourceControl. This way,
the first control that is databound will create the search object and
execute it.

Here is where I've run in to a problem. The only view that has the sort
order is the primary data view (that is currently bound to a grid view.)
So, if any of the other views is executed first (which currently is
happening all of the time), there is no sort string.

As a hack, I've made the view that does get the sort string to simply
re-execute the search. However, this means the search is executed twice for
each page. I'd like to figure out a way around this problem.

Is there a way to force the grid view object to bind first?

Any help would be appreciated.
Jan 16 '07 #1
1 1686
Actually, the hack to simply re-run the search with the sort didn't work.
That broke the bindign to all of the parametric views.

I'd really appreciate any help.

"Bill Sexton" <bs*********@nospam.nospamwrote in message
news:O$**************@TK2MSFTNGP03.phx.gbl...
>I have created a custom DataSourceControl to interface to a search engine.
The DataSourceControl exposes multiple views of the same data. The first
is the actual search results. The other views are for information about
parametric data (i.e. this state has 4 hits, that state has 6 hits, etc.)

So far, I have almost everything working perfectly. I had to move the
code to actually execute the search up in the the DataSourceControl. This
way, the first control that is databound will create the search object and
execute it.

Here is where I've run in to a problem. The only view that has the sort
order is the primary data view (that is currently bound to a grid view.)
So, if any of the other views is executed first (which currently is
happening all of the time), there is no sort string.

As a hack, I've made the view that does get the sort string to simply
re-execute the search. However, this means the search is executed twice
for each page. I'd like to figure out a way around this problem.

Is there a way to force the grid view object to bind first?

Any help would be appreciated.

Jan 26 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Michael Schoen | last post: by
2 posts views Thread by Antoine | last post: by
reply views Thread by EricLondaits | last post: by
3 posts views Thread by Peter | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.