c# - databinding DataGrid to a List<object[]> -
i have list<object[]> mycollection result of select sql query.
each object[] represents row in query result, , length of array vary different queries.
have name of column headers in separate list<string> myheaders.
i want databind mycollection datagrid header of columns myheaders, , autogenerate columns.
the reason want use autogeneratecolumns because want datagrid reconize datatypes of each object, , use appropriate column templates each datatype.
thanks!
if you're stuck , need on: use dataset/ datatable. ancient still work fine! if want know if can done, don't know. examples of binding ilist i've seen manually loop , create columns.
regards gj
Comments
Post a Comment