Unbound DataGridView issue
I am able to开发者_运维知识库 write to my unbound datagridview (VC++), but am unable to read back that same exact value. So I can do this:
myDataGridView[0,0]->Value = 1 ;
And this updates my display correctly.
But I can't do this:
printf("value=%d\n", myDataGridView[0,0]->Value ;
It compiles, but regardless of which cell I read, and regardless if I have ever written to it or not, I always read the same value (8?).
Any idea what I'm doing wrong?
Thanks! Dan
Your question is not very clear when you write "regardless of which cell I read, and regardless if I have ever written to it or not, I always read the same value." Have you tried this? C# example:
dataGridView1.Rows[0].Cells[0].FormattedValue.ToString()
精彩评论