RowFilter Problem RRS feed

  • Question

  • hi iam using dataview to filter date but a stange thing happeneds

    when i write this filer it works fine

    Combine like '%Mox%'



    and i get results

    and at this give me a result

    Combine like '%Mox%'

    but the data i want is that i want to to start with the word MOX so i have changed it to

    Combine like 'Mox%'

    then i di dnot get any results -no erros are given just no result

    what did i do wrong , and is there any way to fix thta


    Wednesday, March 31, 2010 3:26 AM

All replies

  • Could you please post the entire statement that sets your RowFilter? What you have posted should work. Case-sensitivity shouldn't matter either (so, your data could contain "MOX" or "mox" and you should still see it).

    The only thing I can think of is that perhaps the data you seek has been deleted? Rows that have been marked as Deleted typically won't show up in a DataView unless you specfically specify it (with the RowStateFilter property).

    ~~Bonnie Berent [C# MVP]
    Wednesday, March 31, 2010 4:58 AM
  • the problem if u put the % at the starta nd end its works fine

    it only does not work if u put it at the end only


    Wednesday, March 31, 2010 9:07 PM
  • I understand that ... that's what you said in your original post. I'm saying that something else is wrong, because it will work correctly in both cases (both, or only at the end). That's why I asked to see exactly how you're setting the RowFilter in order to see if something doesn't look right there. Also, how are you determining that you're not getting any results? Are you displaying the data in a Grid? Or are you using breakpoints in the debugger and viewing the data that way? If so, how are you viewing the data?

    ~~Bonnie Berent [C# MVP]
    Wednesday, March 31, 2010 11:57 PM