I'm using the new v2.0 DataGridView object to handle
formatting int
values from a DataRow into items in a hash table.
(e.g. keys {0, 1,...n} values {
"hash0,"hash1",..."hashn"})
I am subscribing to the DataGridView.CellFormating and
DataGridView.CellParsing
events. I am able to successfully format and parse values
back using
the
standard DataGridViewTextBoxColumn
Now, I am overriding the AutoGenerateColumns property of the
view and
creating DataGridViewComboBoxColumn, I wish to have a
dropdown with
the enumerated values data
{"hash0","hash1"..."hashn&quo
t;}
I note that when the Items property of the Column is set to
new object[] { "hash0",
"hash1",..."hashn"}
I get a DataError event as the unformatted original values
{0,1,...n}
are checked against the objects in the Items array without
calling any
user formatting hooks
first.
So I change the Items property to
new object[] {0,1,...n}
And the DataError goes away, however I do not see the
DataGridView.CellFormatting
hook being called upon expansion of the combo box (clicking
the down
arrow).
So the values in the listbox portion of the combo box
control are
displayed as {0,1,...n}
Are there any more user formatting hooks, that one can use
to format
values in the ComboBoxColumn?
Thanks,
- Eric
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharp googlegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribe googlegroups.com
For more options, visit this group at http://groups.
google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---
|