Mata

Mata

  • NA
  • 46
  • 34.6k

Using one (or more ) conditions in filter expression

Nov 22 2011 3:41 AM
Is it possible to use only one condition (parameter) in filter expression
example below, so sometimes I would use both conditions and sometimes only one of them. Now when I don't use both, nothing gets filtered (I'm using this on gridview)

FilterExpression="NumberofPages= '{0}' and NumberofPeople= '{1}'"  >
            <FilterParameters>
            <asp:ControlParameter ControlID="TextBox1" Name="NumberofPages" PropertyName="Text" />
            <asp:ControlParameter ControlID="TextBox2" Name="NumberofPeople" PropertyName="Text"  />
            </FilterParameters>

Answers (3)