473,573 Members | 2,886 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataSourceContr ol with multiple views and data binding order

I have created a custom DataSourceContr ol to interface to a search engine.
The DataSourceContr ol 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 DataSourceContr ol. 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 1794
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*********@no spam.nospamwrot e in message
news:O$******** ******@TK2MSFTN GP03.phx.gbl...
>I have created a custom DataSourceContr ol to interface to a search engine.
The DataSourceContr ol 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 DataSourceContr ol. 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2215
by: Michael Schoen | last post by:
Hi there, i=B4m actually developing a performance criticial system where I need to index a huge amount of protocoll data. These data are already in a chronological order, so if I push the data one by one in the database I will never need an ORDER BY syntax, `cause mysql already stores the data the right way. That=B4s tweaking, isn=B4t it...
8
5222
by: Mike | last post by:
Hello, I have a few rather urgent questions that I hope someone can help with (I need to figure this out prior to a meeting tomorrow.) First, a bit of background: The company I work for is developing a web-based application, one part of which involves allowing the user the ability to page through transaction "history" information. The...
2
2245
by: Antoine | last post by:
I would like to construct my own list of items in a grid/ table/ item list layout but I have a problem. I want to add a sort of index row based on time, such as there might be blank values. Sure the data list I have at the moment is in order, but I would like to have each interval possible, and instead of repeating the row index (the time...
5
5384
by: Jeff | last post by:
We are using .Net and the wsdl Utility to generate proxies to consume web services built using the BEA toolset. The data architects on the BEA side create XML schemas with various entities in separate files for ease of maintainability. These schemas are all part of the same namespace. When defining a web service that access more than one...
2
1114
by: WT | last post by:
Hello, I am trying to implement a DataSourceControl and I need to simulate the same functionality as the SqlDataSourceControl : being able to set declaratively the select parameters to use when binding a DetailView to the Selected Row in a GridView, but I have difficulties with the sample in MSDN concerning DataSourceControl, Visual Studio...
1
9580
pbmods
by: pbmods | last post by:
Today I'd like to talk about a new feature introduced in MySQL 5: Views. Views are like snapshots of queries. You can save any query as a view, even complex queries with joins and subqueries, and MySQL will save the results of that query in a format that can be searched (and in some cases, modified) just like a table. But unlike tables, you...
0
1838
by: EricLondaits | last post by:
Hi, I have an ASP.NET page with a ListBox that is data bound to a table with a single field (it holds a list of valid IDs). The page also has a textBox into which you can add new valid IDs, one per line (this is in order to make the process of adding new IDs easy, since it's only done at time of configuration). I have no problem with...
2
3153
by: beargrease | last post by:
I'm kind of comfortable with basic joins, but a current project requires a complex query of many tables. The GROUP_CONCAT(DISTINCT ...) function has been very useful as returning my values as comma delimited values when joining multiple tables. I have one table called 'floorplans' which has two fields (floorplan_jpg & floorplan_pdf), I'd like each...
3
5226
by: Peter | last post by:
I have a GridView which is populated by List<ofObjects> Does anyone have example of how to sort the columns of this GridView? I have found examples without DataSourceControl but these use DataTable, I am using List of Objects. Here's one example: http://ryanolshan.com/technology/gridview-without-datasourcecontrol-datasource/
0
7784
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8205
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7796
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6424
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5601
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3734
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2223
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1310
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1044
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.