Hi,
I have a Window Form to which i added a datagridview. The binding source is working well, but does not update if the database is modified outside the application (i mean not showing the modification made to the database).
Trying to solve my problem, i added a timer to the form that Fill the datagridview every xx milliseconds (basically a timer that calls the Form_Load method). The timer is working nicely, but because it always refresh the grid i can not "work" with the grid, can not add or delete any row because the refresh is too fast. If i change the timer delay for longer delay, i do not see the "real time" changes made outside the program.
What i would like to do is Fill (or anything else) the datagridview only when the data in the database is changed, so i could work in the datagridview of my form and also refresh it when changes have been made from outside the program.
I'm using VS 2005 Framework 2.0 and my program is C#.
Thanks in advance for your help
2 5523
Maybe have your timer check for changes first and then if there are changes refresh. Alternately stop the timer while in edit mode and then start again after editing. HTH.
Hi,
I have a Window Form to which i added a datagridview. The binding source is working well, but does not update if the database is modified outside the application (i mean not showing the modification made to the database).
Trying to solve my problem, i added a timer to the form that Fill the datagridview every xx milliseconds (basically a timer that calls the Form_Load method). The timer is working nicely, but because it always refresh the grid i can not "work" with the grid, can not add or delete any row because the refresh is too fast. If i change the timer delay for longer delay, i do not see the "real time" changes made outside the program.
What i would like to do is Fill (or anything else) the datagridview only when the data in the database is changed, so i could work in the datagridview of my form and also refresh it when changes have been made from outside the program.
I'm using VS 2005 Framework 2.0 and my program is C#.
Thanks in advance for your help
do you have any exemple of code you could provide me or link me to please... it looks like I actually am the main bug (hehe)
thanks
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: thomasp |
last post by:
This is a two part question,
1) The code below should display a form with a datagridview and a few
command buttons. This form should allow the user to make change to the
records displayed
in the datagridview and have to changes written to the Filters table in
an MS Access database. The if the user chooses, clicking on the Restore
button empties
the contents of the Filters table, refills it with the contents of the
DefaulFilters...
|
by: shibeta |
last post by:
Hello,
I have problem with DataGridView and BindingSource. I have created
DataSet and added TableData to it with manualy created columns
(without DataAdapter - I'm not using MSSQL). On the Form I put
DataGridView and BindingSource, and connected them (BindingSource of
course is also connected with DataSet). Next on the separated thread
I'm reading data from DB and load them do DataSet (more preciselly,
readed data I've saved as XML and...
|
by: wongray |
last post by:
Hello Again.
I have another question.
I have a database where I have a combo list and If I want to add a new record in the combo list, and the data will not refresh until I go to the toolbar -> Records -> Refresh.
Please advise how to fix this.
Many Thanks
|
by: MFayaz |
last post by:
Hello!
I have to refresh datagridview when database update , IS there any way to solution that my datagridview auto refresh when any user update database.
Thanks in Advance
|
by: Ryan Liu |
last post by:
Hi,
In the same application, some other form inserted some data to the
database.
To refresh the DataGridView on the form shows those data, I just simple use
Adapter fill the grid again.
//auto-generated code
this.projectTableAdapter.Fill(this.dsPowerCapi.project);
| |
by: siri11 |
last post by:
Hi all..
How to refresh a datagridview control in c#.net so that,the grid becomes empty with empty rows and columns.And if incase any background color is applied to any of the grid row or column should become white after refreshing.
datagridview1.Refresh(); doesn't work.
Thanks in advance
siri
|
by: Christian |
last post by:
Hi, i TRY to create a windows apllication that insert in a Access DB
name and surname; the Insert istruction Works but the the refresh of
DataGridView doesn't works...
the code is :
public Form1()
{
InitializeComponent();
}
#region Variabili
|
by: senm |
last post by:
hi,
I am working in Windows Application using C# .net2005
In my application when I close the child window then the DataGridView in the parent window need to be automatically refreshed, and display updated values
help me please
thanks
|
by: OuTCasT |
last post by:
got some datagridviews on my page....after i have deleted a customer for example and it goes back to the page with the gridview....how i cld i refresh the gridview ???
At the moment i have a function that i jst call when the form closes to send the query to sql. I am using windows forms.
|
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,...
|
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...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |