DataGridView - how to swap rows with columns.

A

A n g l e r

Hi there.

I'm just wondering how I could reassure that rows (of DataGridView) are
of a certain data type rather than columns? I mean consider the following:

Col1 (bool) Col2(int32)
Row1 T 34
Row2 T 34

Now, I would rather have:

Col1 Col2
Row1 (bool) T T
Row2 (int32) 34 34

Hope this comes across enough clear :)

Cheers.
 
M

Marc Gravell

I'm pretty sure you can't. PropertyGrid is based IList/IListSource for
items (rows), using GetProperties() from either TypeDescriptor or
ITypedList for properties (columns). It is expected that the metadata
is the same for every row - it is queried for the entire list, not on
a per-row basis.

You could *perhaps* stick to text formatting (not checkboxes etc) and
do a *lot* of work in the format/validate steps to shim it - I
wouldn't be in a hurry to try this, though.

There is no doubt an alternative grid that would better suit your
needs, but I can't name any...

Marc
 
A

A n g l e r

You could *perhaps* stick to text formatting (not checkboxes etc) and
do a *lot* of work in the format/validate steps to shim it - I
wouldn't be in a hurry to try this, though.

There is no doubt an alternative grid that would better suit your
needs, but I can't name any...

Yep, I'd appreciate if anyone could come up with some recommendation of
an alternative grid ... Don't mind if it comes as a whole package of UI
components.
 

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

Top