asp.net - Using SELECT DISTINCT on an already created DataTable object? -


i have created datatable object using girdview (asp.net) need bind column of object dropdownlist. datatable has correct details in column column contains more 1 of same name in column - hence love kind of select distinct on datatable , copy new datatable use binding dropdown.

this allow me save resources making trip database.

here example, current datatable has column called items , in column has following entries

1 1 1 1 5 5 6 

and of course need unique items binding dropdown, hence need following data

1 5 6 

of course don't want change original datatable object rather make copy of new details

any ideas if possible ? or need make trip db?

thanks in advance

datatable dt = new datatable(); dt = dsmobileinfo.tables[0].defaultview.totable(true, "columnname");

//applying dvresult data set grid for(int i=0;i

hope work you.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -