System.Reflection question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
Is it possible to get the sort order of a datatable column in a datagrid
using System.Reflection?
Thanks,
Mel
 
Mel,

I don't understand what you are trying to do. DataTables are not
sorted, nor are DataColumns. The only way to sort data is using a DataView,
through the Sort property. This will return which columns are used to
determine the sort order of the view.

If what you mean is how are types compared (the underlying type of the
column), then reflection won't help you. Rather, the type has to implement
the IComparable interface, which will compare another instance of a type
with the current one to see which is greater than the other (or equal).

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top