Hi,
The problem is that the SQLDataSource query is firing before the
DropDown change event. So, the first query is based on the old values.
SQLDataSource then queries again after the DropDown value changes.
I've created a Boolean in that is checked in the Selecting event of
the SQLDataSource theat cancels the erroneous queries and I've I've
used the gridview.databind() method in the control change events to
always force a re-query.

Wendell

<[EMAIL PROTECTED]> wrote:
> IsPostBack may be a solution. These queries fire even if I click a
> button that has nothing to do with the gridview. what should I put
> inside the IsPostBack to prevent them from running?
>
> On Sep 29, 3:55 pm, AstroDrabb <[EMAIL PROTECTED]> wrote:
>
>
>
> > Google Page.IsPostBack.
>
> > On Mon, Sep 29, 2008 at 11:26 AM, Wendell <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
> > > I'm running ASP.NET 2.0. I have a gridview with parameters bound to
> > > page web controls through the Configure Data Source Wizard. It uses an
> > > SQLDataSource.
>
> > > The subtotals I was doing in the RowDataBound event of the gridview
> > > weren't adding up. I found that when the dropdownlist selection
> > > changed, the gridview ran the previous query first and then the query
> > > based on the new dropdownlist value. Is there a way to configure the
> > > datasource so that this won't happen?
>
> > > Thanks,
> > > Wendell- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web 
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
 <p><a href="http://feeds.feedburner.com/DotNetDevelopment";><img 
src="http://feeds.feedburner.com/~fc/DotNetDevelopment?bg=99CCFF&amp;fg=444444&amp;anim=1";
 height="26" width="88" style="border:0" alt="" /></a></p>
-~----------~----~----~----~------~----~------~--~---

Reply via email to