joscares
(Joshua Oscares)
1
how can i filter this kind of value on datatable using linq?
Yoichi
(Yoichi)
2
Hi,
How about the following expression?
dt = dt.AsEnumerable.Where(Function(r) System.Text.RegularExpressions.Regex.IsMatch(r("merchantorderid").ToString,"^\d+$")).CopyToDataTable()
Regards,
Hi @joscares ,
Alternately, maybe using IsNumeric
to check whether the value in cell contains a non-numeric or not :
dt = dt.AsEnumerable.Where(Function(r) r("merchantorderid").ToString.Trim.IsNumeric).CopyToDataTable()
Also, to handle the Conversion to Datatable Error, check the following post :
system
(system)
Closed
4
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.