DataGrid datasource with different objects

  • Thread starter Thread starter Al
  • Start date Start date
A

Al

Hi!

I need to bind datagrid with my collection that contains
objects of two different types.

Can I do this?

Thanks.
 
Hi,

I'm afraid this is not possible - the grid considers the first item in the
collection to be the type determiner and then assumes that the rest of the
items have the same type. I think you can cheat it by having object with
just the same public property names but it's a rigid and dishonest solution.
 

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