Re: ObjectDataSource Binding Before I Need it

On 28 Mar, 21:17, Jason Wilson <wils... [at] ausrad.com> wrote:
> I have a gridview that is using an objectdatasource that is calling a
> BLL class that wraps a Typed dataset. =A0The objectdatasource has
> parameters that tied to page controls (textboxes, dropdowns ect) =A0I
> had always thought that the Objectdatasource wouldn't bind while the
> gridview's visible property was set to false, but I'm experiencing
> timeouts when the page is initially loaded =A0when the objectdatasource
> tries to bind without the necessary user input to filter down the
> results and before I make the gridview visible.
>
> Can anyone suggest a way to prevent the objectdatasource from binding
> untl the user has filled in the form?
>
> Thanks,
>
> Jason

Dear Jason

When binding the ObjectDataSource to the GridView with the
DataSourceID property you have no control over when the binding
occurs.

If there are problems because of (intially) null parameter values then
set the "DefaultValue" property of each parameter to something
meaningful (DefaultValue is used when the actual parameter source - in
this case a web server control - has null content).

HTH
Stan [ Sa, 29 März 2008 11:29 ] [ ID #1931380 ]
Microsoft » microsoft.public.dotnet.framework.aspnet » Re: ObjectDataSource Binding Before I Need it

Vorheriges Thema: Re: How do I increase the java memory for JBOSS
Nächstes Thema: Can I integrate wordpress in ASP.NET