By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,671 Members | 1,559 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,671 IT Pros & Developers. It's quick & easy.

DataGridView - how to swap rows with columns.

P: n/a
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.
Jun 27 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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
Jun 27 '08 #2

P: n/a
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.
Jun 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.