469,919 Members | 2,189 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Issue with DataGridView on initial data load

Hi, I have a problem with the datagridview not refreshed when the
application first appear on the screen.

The datagridview display data from a table in the dataset. At the same
time, I've added checkbox columns that are not bounded the table.
This datagridview is located in the tab (2nd). I thought I mention that
since that might be part of the problem (?).

When the applications start, it will need some parameter criteria selection
to retrieve data for display.
After the data load to the tables in the dataset here is what I do the the
datagridview.

I do a foreach loop to the datagridview. Based on a specific cell value
(with is hidden) in each row, I set the appropriate checkbox column to true.
There are 4 unbounded checkbox columns on a row in the datagridview.
The thing is, then I go to the tab where the datagirdview is, the checkboxes
that is suppose to have checks are not, checked. But when I move to a
different record, the datagridview now show the correct information. The
checkboxes are properly checked (accordingly).

I did the datagridview.Refresh(); after the initial data load but no luck.

Any idea?

Thanks,

Rick..


Aug 18 '06 #1
2 8480
As you're looping through the list, try calling EndEdit() on each row after
you have manipulated their values.

"Rick Shaw" <ri*****************@hotmail.comwrote in message
news:uP****************@TK2MSFTNGP02.phx.gbl...
Hi, I have a problem with the datagridview not refreshed when the
application first appear on the screen.

The datagridview display data from a table in the dataset. At the same
time, I've added checkbox columns that are not bounded the table.
This datagridview is located in the tab (2nd). I thought I mention that
since that might be part of the problem (?).

When the applications start, it will need some parameter criteria
selection
to retrieve data for display.
After the data load to the tables in the dataset here is what I do the the
datagridview.

I do a foreach loop to the datagridview. Based on a specific cell value
(with is hidden) in each row, I set the appropriate checkbox column to
true.
There are 4 unbounded checkbox columns on a row in the datagridview.
The thing is, then I go to the tab where the datagirdview is, the
checkboxes
that is suppose to have checks are not, checked. But when I move to a
different record, the datagridview now show the correct information. The
checkboxes are properly checked (accordingly).

I did the datagridview.Refresh(); after the initial data load but no
luck.

Any idea?

Thanks,

Rick..


Aug 21 '06 #2
Hi Dan. Thanks for the reply. I tried that but no luck.

I have narrowed the problem though. I think it has something to the fact
that the datagridview is located in a tab not on focused (or not showing)
when the data gets loaded in the dataset. I found this out then I did a
test run, that I clicked on the tab that contains the datagridview (make it
showing) before hitting the control that triggers the data load into the
dataset. With that, the check showed properly.

Any idea? Is it a bug in .net?

Help!

Rick..
"Dan Normington" <dn******@yahoo.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
As you're looping through the list, try calling EndEdit() on each row
after
you have manipulated their values.

"Rick Shaw" <ri*****************@hotmail.comwrote in message
news:uP****************@TK2MSFTNGP02.phx.gbl...
Hi, I have a problem with the datagridview not refreshed when the
application first appear on the screen.

The datagridview display data from a table in the dataset. At the same
time, I've added checkbox columns that are not bounded the table.
This datagridview is located in the tab (2nd). I thought I mention that
since that might be part of the problem (?).

When the applications start, it will need some parameter criteria
selection
to retrieve data for display.
After the data load to the tables in the dataset here is what I do the
the
datagridview.

I do a foreach loop to the datagridview. Based on a specific cell value
(with is hidden) in each row, I set the appropriate checkbox column to
true.
There are 4 unbounded checkbox columns on a row in the datagridview.
The thing is, then I go to the tab where the datagirdview is, the
checkboxes
that is suppose to have checks are not, checked. But when I move to a
different record, the datagridview now show the correct information. The
checkboxes are properly checked (accordingly).

I did the datagridview.Refresh(); after the initial data load but no
luck.

Any idea?

Thanks,

Rick..




Aug 28 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by RSH | last post: by
1 post views Thread by RSH | last post: by
2 posts views Thread by Chris Strug | last post: by
7 posts views Thread by Mitchell S. Honnert | last post: by
1 post views Thread by Tony M | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.