471,592 Members | 1,168 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,592 software developers and data experts.

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 1738
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
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.