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

Multiple FilterParameters in GridView

Using VS2005 and SQL2005.
Is there any way to handle multiple FilterParameters or ControlParameters in
SQLDataSource on a GridView? I have 4 asp:textbox fields that can have any
combination of conditions, but if empty I want to ignore them. I know how
to do it in SQL code but want to eliminate that if I can do it with
parameters in SQLDataSource control. I am using just 1 now (see below) and
it works great. Thanks.

David
FilterExpression="FileName Like '%{0}%'">

<FilterParameters>

<asp:ControlParameter Name="FileName" ControlId="txtFindName"
PropertyName="Text"/>

</FilterParameters>
Apr 19 '06 #1
0 1526

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

Similar topics

1
by: fuchs.markus | last post by:
Hello, on my page, I have a DetailsViewControl connected to a SqlDataSource. Now when I dynamically set the FilterExpression and FilterParameters - for example in a OnClick-EventHandler of a...
0
by: Andre | last post by:
Hi, I use a FilterExpression (FilterParameters) to select the value to be displayed in my DetailsView, but when i select a row in my GridView, the DetailsView retun this error: Cannot perform...
0
by: ZBoT | last post by:
Hi! I am trying to filter a SqlDataSource based on two fields (textboxes). They both don't have to be filled out at the same time although they can be. Currently when I run if I do not fill out...
6
by: Terry | last post by:
Good morning! How do I determine which SELECT button was clicked in a GridView? The multiple SELECT buttons will be used for an application approval process. Thank you in advance for your...
2
by: Dabbler | last post by:
In some cases I would like to allow a user to select a row from a GridView to update in another page using a DetailsView form (passing the key in QueryString). In other cases I would like to use...
1
by: Bruno Alexandre | last post by:
Hi guys... I have this <asp:SqlDataSource ID="dsProdutos2" runat="server" SelectCommand="SELECT * FROM " FilterExpression="idProduct='@idProduct'"
0
by: Radu | last post by:
Hi. On the first page of my website the user selects one document which can be in either English or French. I store that choice in a class, and I can extract it with:...
0
by: sharonrao123 | last post by:
hello all, I have a parent gridview company and in this one a nested gridview people, Is it possible to allow the user to select one row or multiple rows from the people gridview using a check box...
2
by: Michael | last post by:
It seems that a gridview allows us to delete only a single row at a time. How to extend this functionality to select multiple rows and delete all of the selected rows in a single stroke? just like...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.