470,628 Members | 2,251 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,628 developers. It's quick & easy.

DataGrid with a table style does not refresh properly when changing the datasource

I have a Windows form where a user enters an order number which returns a
dataset that is bound to a datagrid. The problem is when a user clicks on a
cell in the datagrid, then enters another order to get information for,
everything is updated with the new data except the cell in the grid that was
selected. This behavior does not occur when a table style is not applied to
the datagrid.

How do I refresh the datagrid so that the cell in the datadrid is also
refreshed?

Thanks,

Shawn
Nov 17 '05 #1
1 1854
For those that may run into this, problem there is a KB article for this
problem:

890211 FIX: The cells are not cleared when you set the Datasource property
to NULL on cells that have a custom DataGridColumnStyle property in the
...NET Framework 1.1

http://support.microsoft.com/?id=890211

I also found that if the focus is set to the datagrid before changing the
datasource, it will refresh properly.

"Shawn Benson" <Sh****@nepopt.com> wrote in message
news:e3**************@TK2MSFTNGP14.phx.gbl...
I have a Windows form where a user enters an order number which returns a
dataset that is bound to a datagrid. The problem is when a user clicks on a cell in the datagrid, then enters another order to get information for,
everything is updated with the new data except the cell in the grid that was selected. This behavior does not occur when a table style is not applied to the datagrid.

How do I refresh the datagrid so that the cell in the datadrid is also
refreshed?

Thanks,

Shawn

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Matthew Woods | last post: by
5 posts views Thread by John Richardson | last post: by
3 posts views Thread by Jim Heavey | last post: by
8 posts views Thread by Inigo Jimenez | last post: by
1 post views Thread by Jeremy | last post: by
6 posts views Thread by Doug Bell | last post: by
3 posts views Thread by JJ | last post: by
6 posts views Thread by =?Utf-8?B?TWFyaw==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.