473,725 Members | 2,070 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Re fresh(); after the initial data load but no luck.

Any idea?

Thanks,

Rick..


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

"Rick Shaw" <ri************ *****@hotmail.c omwrote in message
news:uP******** ********@TK2MSF TNGP02.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.Re fresh(); 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******** ********@TK2MSF TNGP04.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.c omwrote in message
news:uP******** ********@TK2MSF TNGP02.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.Re fresh(); 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
29687
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 datagrid refreshes with the new table. Everything works good except every susequent table that is selected is appended to the data grid view. How do I flush out the data from the previous bind so that only the new table is displayed? Thanks,
0
1706
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 it happens but occassionally tables take a long time to load... They are not the same tables, and it doesn't appear consistent. But a simple table that contains a single row can take up to 30 seconds to load, while only seconds before a table...
1
3147
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 database table from the list I refresh the datagridview with the newly selected tables data. This works fine but after a few tables have been selected it takes a very long time to load some of the tables. Some tables that contain only one row of...
2
5706
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 parameter to filter the data retrieved. When the form is first loaded, the DGV is populated from the procedure with no parameter - I've managed to get this bit working fine.
7
12624
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 the background for my question... Before I switched my application over to the Fx 2.0, I used a DataGrid to display my data. I would store different DataGridTableStyles (each one with a custom set of columns) in the DataGrid.TableStyles property...
7
16453
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 they can only input numerical values. Is there any way to do this? Currently my formatting works but if the user enters a value manually the formatting is not applied to the new value. Also I haven't found a way to allow only numerical input....
12
13640
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 display in a textbox below the datgridview. I currently have it fixed so if you click on a row the note field from that row is put in the textbox. I'd like this to be automatic as they move through rows. Also the note field is one of two fields...
1
3378
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) export to excel button exports the visible columns from the datagridview to excel (this works fine)
1
1344
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 know there are records in the DB b/c I'm able to display records using the control itself. Now I want to do it dynamically. I'm really trying to retrieve records from DB and manipulate them and update them. After I get this to run I want to use a...
0
9401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9257
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9113
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8097
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6702
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.