Can anyone point me in the right direction here...>
I have a gridview that grabs CategoryID(int), VendorID(int), LoadOS(bit), and Addressable(bit) from my SQLDataSource.
I am trying to filter based off of those fields using seperate dropdown/checkbox controls called ddlCategory, ddlVendor, ckOS, and ckAddressable.
The issue that I'm fighting with is having data display when only one of the conditions is met.
For example, if the VendorID is 1, then I want to see all the rows where VendorID=1 regardless of the other 3 options (unless they are filled in or checked).
I have tried using the Where... feature and specifying the controls from the DataSource, but that seems to only work if all the conditions are satisfied.
I had to do this from Access once and I ended up having to build the SQL statement from code instead of stored procedures in this case.
Am I missing something or what?
I have a gridview that grabs CategoryID(int), VendorID(int), LoadOS(bit), and Addressable(bit) from my SQLDataSource.
I am trying to filter based off of those fields using seperate dropdown/checkbox controls called ddlCategory, ddlVendor, ckOS, and ckAddressable.
The issue that I'm fighting with is having data display when only one of the conditions is met.
For example, if the VendorID is 1, then I want to see all the rows where VendorID=1 regardless of the other 3 options (unless they are filled in or checked).
I have tried using the Where... feature and specifying the controls from the DataSource, but that seems to only work if all the conditions are satisfied.
I had to do this from Access once and I ended up having to build the SQL statement from code instead of stored procedures in this case.
Am I missing something or what?