473,769 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

datagridview refresh

M K
I have added a record to the underlying db and after I add the record i do a
datagridview.Re fresh(); and i dont see the newly added record.

If i stop and start the application its there. What am I doing or not
doing?

Mark
Jul 10 '07 #1
3 27949
datagridview.Re fresh() redraws the grid-view from the data source
(presumably a DataSet in your case); it doesn't reload the DataSet
from the database. You may have to Clear() and Fill() the DataTable
(or DataSet).

Marc

Jul 11 '07 #2
M K
I found the .Clear() method but not the .Fill() method on the dataset.

I have the following:
Dataset
BindingSource
TableAdapter

"Marc Gravell" <ma**********@g mail.comwrote in message
news:11******** **************@ o61g2000hsh.goo glegroups.com.. .
datagridview.Re fresh() redraws the grid-view from the data source
(presumably a DataSet in your case); it doesn't reload the DataSet
from the database. You may have to Clear() and Fill() the DataTable
(or DataSet).

Marc

Jul 11 '07 #3
M K
uggg i finally figured it out..

DataSet1.GetCha nges();

TableAdapter.Fi ll(DataSet1.tab le);

thanks for pointing me in the right direction :)

"M K" <sk************ ********@yahoo. comwrote in message
news:%J******** *********@newsr ead3.news.pas.e arthlink.net...
>I found the .Clear() method but not the .Fill() method on the dataset.

I have the following:
Dataset
BindingSource
TableAdapter

"Marc Gravell" <ma**********@g mail.comwrote in message
news:11******** **************@ o61g2000hsh.goo glegroups.com.. .
>datagridview.R efresh() redraws the grid-view from the data source
(presumably a DataSet in your case); it doesn't reload the DataSet
from the database. You may have to Clear() and Fill() the DataTable
(or DataSet).

Marc


Jul 11 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3150
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...
6
50477
by: George | last post by:
Hi, I have been encountering a refresh problem with DataGridView, which is bound to a DataTable. When I make updates (Add, Delete, update) to the DataGridView, everything flow nicely to DataTable. No problem here. However, when I add data (programatically) to the DataTable, the DataGridView does not refresh right away. If I minimize and show my form,
2
5019
by: Ivan | last post by:
I have a class Foo which have two property. I have a thread that do some process and update class Foo int B. I have a datagridview on main form. this datagridview data source to this class Foo and column A binds to string A and column B binds to int B. When i start two threads, the datagridview able to show two rows and updated int B at run time. How? public class Foo { public Foo()
2
8722
by: Rick Shaw | last post by:
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...
3
7596
by: David Cartwright | last post by:
Hi all, I'm having a weird time with a call to the Refresh() method of a DataGridView. I have a VB.NET 2005 Windows application with a main form and a "worker" thread. The main form delegates a Sub to the worker so that the latter can refresh the DataGrid after updating the DataTable driving it. When I run the app under the debugger, everything's fine. But when I run it for real, it hangs, apparently in the Refresh() method of the...
3
25072
by: Richard Lewis Haggard | last post by:
I have a DataGridView which has a cell that is going to contain what might be a large amount of text data. The UI designed has decreed that each row will have a button that toggles the row's multiline display such that, when the button is up, the row is a single line and when the button is down, the row enters a multiline mode so that the cell can expand to a height great enough to display all of the cell's contents. I've figured out how to...
7
7388
by: mvenkatesan | last post by:
Hi guys I am win appl. I was bind the datagridview from datatable. i was changed datas @ runtime. datatable changed but my datagridview not refresh. I written dagaridview.refresh(); not work how to refresh? Thanks in advance Venky
1
3759
by: Aegixx | last post by:
Ok, extremely wierd situation here: (I'll post the code below, after the explanation) I've got a Windows application (.NET 3.5) that has a single Form with a DataGridView embedded. The user presses a button to do a SQL query (fill a DataSet). Before firing the query, I disable the grid/buttons and turn on UseWaitCursor. After it completes, I re-enable the grid/ buttons, refresh the dataset, then turn off the UseWaitCursor. If I...
3
4806
by: aleesha | last post by:
using c# and vs2005 I am trying to refresh a datagridview control after updating a database, but despite everything I've tried, no success. When the app starts up, GridRefresh() is called to initially populate the dgv. This works fine. The app then updates the database and calls GridRefresh() again expecting to see an updated row of the dgv with the updates, but no update -- just the original data. The database is definitely being...
0
9579
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9422
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10208
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
10038
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
9857
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
8867
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...
0
5294
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
5444
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3558
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.