Wednesday 25 July 2012

How to select a distinct values from particular column in the datatable

// here 'm datatable from cache which is already stored, u can careate ur own datatable  

                    DataTable NewGdt = (DataTable)HttpRuntime.Cache[cachekey];
                    DataView Griddataview = new DataView(NewGdt);


                    DataTable distinctValues = Griddataview.ToTable(true, "Columnname");

No comments:

Post a Comment