Hi,
Ascending is not working on that record.
I have used Sort DataTable activity on discount column but failed to get the write answer.
Ascendig is not working… can someone help.
Hi,
Ascending is not working on that record.
I have used Sort DataTable activity on discount column but failed to get the write answer.
Ascendig is not working… can someone help.
Hi,
It’s because data is sorted as string. Can you try the following expression? It will sort data as double.
dt = dt.AsEnumerable.OrderBy(Function(r) Double.Parse(r("Discount").ToString)).CopyToDataTable()
Regards,
Thanks its working. I forgot it was double and haad to solv with other way.
Can you tell me how can i know sort as it shows only the value with dicosunt higher then 10 percent.
Hi,
Sorry but i cannot get your additional question well. Can you elaborate with specific sample, if possible?
Regards,
Hi,
The same column Discount i want to show only data where discount value is higher then 10 percent.
HI,
Thanks, the following will work. Can you try this?
dt.AsEnumerable.Where(Function(r) Double.Parse(r("Discount").ToString)>10).OrderBy(Function(r) Double.Parse(r("Discount").ToString)).CopyToDataTable()
Regards,
My issue is resolved and thank you for the big help.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.