[C#] RowFilter On DataView, Grouping...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • StefanPienaar
    New Member
    • Nov 2007
    • 17

    [C#] RowFilter On DataView, Grouping...

    Hi, I have a rather big DataTable which is filtered by using a DataView and it's RowFilter property.

    At the moment we have a rather complex user control which generated a where statement for the data. The output given is something along the lines of:

    "ID Like '%123' AND Name Like '%Stefan%' OR ID Like '%456' AND Name Like '%Test%'"

    What I would like to do is group the statements for example: notice the brackets....
    "(ID Like '%123' AND Name Like '%Stefan%') OR (ID Like '%456' AND Name Like '%Test%')"

    Can this be done using the RowFilter property? doing it on a SQL level is not an option :(

    Thanks, Stefan
  • StefanPienaar
    New Member
    • Nov 2007
    • 17

    #2
    Haha, nevermind. I found the problem with my code. The "Id" field does not exist and it should be "IdNo", it now works just as expected.

    Stefan

    Comment

    Working...