Hi,
Marc Gravell schrieb:
I added (before Application.Run ):
I can't do that because it is an MDI application and my MDI windows may
be opened or not.
>
...
and it is reporting Int32 (not String); can you reproduce this
behaviour in a short (but complete) example?
Yes, here ist a short example:
namespace TestApp2008
{
public partial class Form1 : Form
{
public Form1()
{
InitializeCompo nent();
}
protected override void OnLoad(EventArg s e)
{
dataGridViewTes t.Rows.Add();
DataGridViewCom boBoxCell lComboBoxCell =
(DataGridViewCo mboBoxCell) dataGridViewTes t.Rows[0].Cells[0];
lComboBoxCell.D ataSource = new int[] { 1, 2, 3, 4, 5 };
}
private void dataGridViewTes t_CellEndEdit(o bject sender,
DataGridViewCel lEventArgs e)
{
object loValue =
dataGridViewTes t.Rows[e.RowIndex].Cells[e.ColumnIndex].Value;
string lstrMsg = string.Format(" Row:{0}, Col:{1}, Type:{2}",
e.RowIndex, e.ColumnIndex, loValue.GetType ());
System.Diagnost ics.Trace.Write Line(lstrMsg);
}
}
}
And the result is:
Row:0, Col:0, Type:System.Str ing
>
Marc
Best regards
Martin