Displaying a collection of objects in a .Net grid on a smartphone without data binding.

Posted by Xav on Stack Overflow See other posts from Stack Overflow or by Xav
Published on 2010-03-08T21:46:38Z Indexed on 2010/03/08 21:51 UTC
Read the original article Hit count: 229

Filed under:
|

I know there's No DataGridView in the CF, but I've got a collection of in-memory objects that I want to display in a grid on a phone.

Options I have thought of:

  1. Stick all the objects into a SQL-CE database and use a bound datagrid. This'll mean pulling my classes apart and separating the data from the functionality, which may or may not be a bad thing, but seems a little overkill.

  2. Write my own dataset and binding code so that I can bind my collection of objects to a bound datagrid. No idea how practical or possible this is, but seems like it's either do-able or impossible and I'm hoping someone here knows which!

  3. Find a third-party unbound grid control. The only one I've seen mentioned is OpenNetCF, which I'm downloading as I type. Are there others? Are any of them any good?

  4. Do something very nasty with dynamically loading labels and textboxes into a scrolling region on the form. REALLY don't want to go there.

I'm not much experienced with data-bound controls other than occasionally making use of the very vanilla functionality in WinForms or ASP.Net, and that quite a long time ago, so if any of the above are silly, please be gentle.

Thanks

Xav

© Stack Overflow or respective owner

Related posts about compact-framework

Related posts about grid