您好 ChenCharles,
DataTable中的过滤符中like可以有以下几种用法。
dataView.RowFilter = "Name LIKE 'j*'" ; // values that start with 'j'
dataView.RowFilter = "Name LIKE '%jo%'" ; // values that contain 'jo'
dataView.RowFilter = "Name NOT LIKE 'j*'"; // values that don't start with 'j'
我们可以使用 * 和 %,不可以使用_, 因为过滤语句最终都要转化为C#代码。其中*对应string的StartWith和EndWith方法,%对应string的Contains方法。在string中并没有方法和_相对应。
Best Regards,
Li Wang
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.