I am getting a table in asp.net with sql server. I wanna get all distinct rows according to a single column. I am using .net 2.0 .
I am using "ToTable
" method of dataview but it is giving distinct rows according to all column. My code is here.
DataTable dt1 = dt.DefaultView.ToTable(true, new string[] {"productid", "sizetitle", "exprice","price", "sizeID" });
I wanna get distinct rows according to sizeid column. Where sizeid is distinct. But many rows my price and exprice have distinct value then it is giving multiple sizeid rows.
Please suggest m开发者_高级运维e. Thanks in advance.
精彩评论