Hi everyone. Im having a problem on filtering a datatable with the lowest price options.
Im searching for a product in a website, making a data table out of the multiple publications and then filtering by the 10 lowest prices.
I dont know what expression should i use in filter-datatable activity or assign, nor do i know how to keep only 10 rows.
If anyone could help me, i would really appreciate it, im a newbe.
Thank you all
Can you try the following expression?
dt = dt.AsEnumerable.OrderBy(Function(r) CDbl(r("Price").ToString)).Take(10).CopyToDataTable()
The following sample also helps you.
Sample20230614-1L.zip (8.5 KB)
Hello Yoichi. Thank you so much, im so thankful/grateful. I resolved it by another way but then i tried what you said and work just perfect.
If you dont mind telling me why is that “function” order the rows by the lowest price, and what is the meaning of caracter “r” (Row?) i will really appreciate it.
Thank you again, my first time using a forum jaja
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.