S
Steve
I have a bound DataGridView. When I add an item to the DataSource, the
DataGridView won't reflect the new row. I have googled and googled, no
solution that I have found online works. One thing that did work (sorta)
was this:
<code>
object tmp = dataGridView1.DataSource;
dataGridView1.DataSource = null;
dataGridView1.DataSource = tmp;
</code>
That is ugly code and I'm not happy about it. Another thing is that after I
run the above code, all the items are bound in the reverse order, isn't that
weird?
Anyway, Refresh(), EndUpdate() Parent.Refresh() - none of that works. Is
this a known bug? Anyone have a trick?
Thanks,
Steve
DataGridView won't reflect the new row. I have googled and googled, no
solution that I have found online works. One thing that did work (sorta)
was this:
<code>
object tmp = dataGridView1.DataSource;
dataGridView1.DataSource = null;
dataGridView1.DataSource = tmp;
</code>
That is ugly code and I'm not happy about it. Another thing is that after I
run the above code, all the items are bound in the reverse order, isn't that
weird?
Anyway, Refresh(), EndUpdate() Parent.Refresh() - none of that works. Is
this a known bug? Anyone have a trick?
Thanks,
Steve