473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 8696
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: RSH | last post by:
Hi, I have a situation where I have a datagridview on a form. I am making a dynamic table editor where users select a database table and then it calls this function where the data in the...
0
by: RSH | last post by:
I have a simple Windows Form, where i have a datagridview. The user can switch between databases and select the tables via DropDownLists. I am having a problem that I can't really pinpoint when...
1
by: RSH | last post by:
Hi, I have a situation where I have a DDL that lists all of the tables in a particular database, and a Datagridview which appears in the same from below the DDL.. When the user selects a new...
2
by: Chris Strug | last post by:
Hi, As a learning exercise I have created a simple form which contains a DataGridView, a Textbox and a Command Button. The DGW is populated from a stored procedure which optionally takes a...
7
by: Mitchell S. Honnert | last post by:
Is there an equivalent of the DataGrid's DataGridTableStyle for the DataGridView? If not, is there an easy way to duplicate the DataGridTableStyle's functionality for the DataGridView? Here's...
7
by: Ryan | last post by:
I have a DataGridView which displays numeric (Int32) data from an underlying database. I want the numbers to be displayed in numeric format "#,###" (with commas). I want to also limit the user so...
12
by: cj | last post by:
When viewing a datatable in a datagridview one of the columns in it is a "note" field which can be quite long. I would like to have the note field of the currently selected row of the datagrid...
1
by: TG | last post by:
Hi! I have an application in which I have some checkboxes and depending which ones are checked those columns will show in the datagridview from sql server or no. After that I have 2 buttons:...
1
by: Tony M | last post by:
VS 2005 - vb .net - windows xp pro - windows app All I'm trying to do for now is populate a datagridveiw (dgvTest). I trying to learn how to retrieve records from DB and add, edit, delete. I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.