Home All Groups Group Topic Archive Search About

How to programmatically change a Select Parameter

Author
1 Jul 2006 9:46 PM
Fred
I'm working with VB.NET and ASP.NET 2.0.  I've set up a Gridview. I want to
select on an integer field, lets say Invoice Number.  I've added a  text
control and Submit button to the page, and configured the datasource to
filter on this textbox control.  It works fine in a default manner, no rows
are returned if the textbox is empty, and a single row is returned if a valid
Invoice Number is entered in the textbox.  How can I program the gridview to
return all rows if nothing is entered in the text box?

Author
2 Jul 2006 6:11 AM
Cor Ligthert [MVP]
Fred,

I still did not use the gridview, but mostly are the complex data controls
completely dependend from their datasource, therefore if it is a datatable,
than it is just the complete column, however all kind of other answers can
be possible.

Cor

Show quoteHide quote
"Fred" <F***@discussions.microsoft.com> schreef in bericht
news:D1C7571B-F1BD-4A60-818A-ED635902EE3E@microsoft.com...
> I'm working with VB.NET and ASP.NET 2.0.  I've set up a Gridview. I want
> to
> select on an integer field, lets say Invoice Number.  I've added a  text
> control and Submit button to the page, and configured the datasource to
> filter on this textbox control.  It works fine in a default manner, no
> rows
> are returned if the textbox is empty, and a single row is returned if a
> valid
> Invoice Number is entered in the textbox.  How can I program the gridview
> to
> return all rows if nothing is entered in the text box?