473,386 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

ODS + GridView -- how to prevent databinding when control parameters not yet set

Hello

I'm displaying report on a gridview through object data source which
gets some parameters from ddl controls. Using sql profiler I've found
out that even when controls are not yet set (by default they are set to
empty string value, so I guess they should be interpreted as nulls)
query (with empty parameters) is sent to sql server (it doesn't return
anything). It causes unnecessary server load and slows down each
postback, until all controls are set and gridview can display data.

Isn't there any way to prevent the databinding and sending query to sql
server until all object data source parameters are set (i.e. not null)?
I know something like that is possible with sql datasource.

I mean of course declarative way without adding additional biz. layer,
but if it's not possible then I'd be glad to see any elegant solutions
with small amount of additional code.

thanks

Oct 8 '06 #1
1 2150
I suppose you could enable caching which may help with overall load but
won't specifically address your issue.

Declaratively, you don't have much choice. Dynamically, you can hook up the
control and specifically determine when it should query however, you'd need
to do this as an either or solution (either declarative and accept the load
on the database or dynamic with code).

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------
"H5N1" <ha****@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
Hello

I'm displaying report on a gridview through object data source which
gets some parameters from ddl controls. Using sql profiler I've found
out that even when controls are not yet set (by default they are set to
empty string value, so I guess they should be interpreted as nulls)
query (with empty parameters) is sent to sql server (it doesn't return
anything). It causes unnecessary server load and slows down each
postback, until all controls are set and gridview can display data.

Isn't there any way to prevent the databinding and sending query to sql
server until all object data source parameters are set (i.e. not null)?
I know something like that is possible with sql datasource.

I mean of course declarative way without adding additional biz. layer,
but if it's not possible then I'd be glad to see any elegant solutions
with small amount of additional code.

thanks

Oct 8 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: ck388 | last post by:
For some reason when I enable the callback feature of the gridview I still get a page refresh, that is it seems like there is a postback that occurs, not a callback which is just supposed to update...
4
by: Anatoly | last post by:
Put any control on web page. create Init event for ths control. Write Response.Write("here") inside this event. Compile\build\run. I never saw "here" string appear on web page. Why???
1
by: Solx37 | last post by:
I am trying to figure out how to prevent scrolling when I append text. It scrolls to the bottom whenever I use AppendText. It jumps to the top whenever I += text to the Text property.
0
by: Tatyana | last post by:
Hi All, I'm trying to Bind a GridView to an XML data file. I have set up the Templates for the datafields of the GridView. I have several label controls, in one of them, to which I'm binding to....
0
by: Wayne Sepega | last post by:
I have the following Code (or something very close to it) Subscription subscription = BR.GetSubscription(UserId, SubscriptionId); txtSubName.text = subscription.Name; txtStartDate.text =...
3
by: Dabbler | last post by:
I have a checkbox control in a GridView EditItemTemplate. My SqlDataAdapter complains when I try and use UpdateCommand Thanks on any binding clarification. GridView: <asp:TemplateField...
3
by: HP | last post by:
hi there Is it possible to bind a datasource to a dropdownlist contained in a user control if datasource is positioned on the parent page of user control? I guess not, since user control...
1
by: richardl | last post by:
I am creating an interface that has a number of ObjectDataSources and GridViews in UpdatePanels. The data being sent to the gridviews in quite large (search results, etc..) and therefore each...
6
by: rsdev | last post by:
Hi, I'm sure this is very basic but I'm having a problem with GridView in a user control. The codebehind is calling data from a strongly typed list and binding it to the gridview control but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.