By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,105 Members | 2,541 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,105 IT Pros & Developers. It's quick & easy.

Issue with DataGridView on initial data load

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.