473,326 Members | 2,126 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,326 software developers and data experts.

SqlDataSource not loading on page load

Howdy,

I have a gridview and a sqldatasource. i need to do a little processing
before I can let the GridView run and load from the SqlDataSource. I have
the query I need already in the SelectCommand of the SDS so it runs when the
page is first loaded. Is there a way to stop it from loading and let it load
programatically? My first guess is to remove the select command from the SDS
and populate it when I want it to load, then DataBind the GridView. What do
you think?

Thanks,

David Lozzi

May 4 '07 #1
1 3159
You could remove the select command, as you said, then, in the event of your
choice, put something like:
MyDataSource.SelectCommand="YourSQLGoesHere"
Gridview1.Databind

David Wier
MVP/AsPInsider
http://aspnet101.com
http://iwritepro.com

"David Lozzi" <dl****@nospam.nospamwrote in message
news:CD**********************************@microsof t.com...
Howdy,

I have a gridview and a sqldatasource. i need to do a little processing
before I can let the GridView run and load from the SqlDataSource. I have
the query I need already in the SelectCommand of the SDS so it runs when
the page is first loaded. Is there a way to stop it from loading and let
it load programatically? My first guess is to remove the select command
from the SDS and populate it when I want it to load, then DataBind the
GridView. What do you think?

Thanks,

David Lozzi

May 4 '07 #2

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

Similar topics

4
by: Adrian MacNair | last post by:
Hi, I created an image gallery which displays 63 images in a slideshow. The problem is that the show was slow because each image loaded one at a time during the show. No problem right? I just...
3
by: zapov | last post by:
Hi! Did anyone successfully managed to use some custom ADO.NET provider with SqlDataSource? I'd like to connect to some other database than MSSQL (like MySQL, Firebird or PostgreSQL) but I'm...
4
by: | last post by:
I'm building some user controls. I very much like how you can build custom properties to be bound to a user control, and how instances of that control will show those custom properties in the...
3
by: Asaf | last post by:
Hi, I have SqlDataSource control that makes a "select count" to show how many rows there are in a Table and it is working fine on first page load. The problem is that when I am inserting a new...
6
by: djc | last post by:
I had previously (in asp.net 1.1 and asp.net web matrix) just done this to populate a listbox with data from a database: ------------ this was from the page load event ---------------- 'fill...
2
by: Brad Isaacs | last post by:
Good evening friends, I have added a Drop Down List box control to my web form. I am using the web.config connection string to access my SQL Server 2000 db. Inside that db I have a table named...
1
by: Chris | last post by:
Hi, I want to limit the amount of data shown in a page coming from a database. Everything works except that I get the error: "Unable to cast object of type...
1
by: Vili | last post by:
Hi all I would like to get some ideas and opinions of my solution for dataconnection on asp.net 2.0 I have created a class which encapsulates the sqldatasource usage. With my class one can...
4
by: mohaaron | last post by:
This seems like it should be simple to do but for some reason I have been unable to make it work. I would like to databind a SqlDataSource to a GridView during the click event of a button. This...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.