473,396 Members | 2,158 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,396 software developers and data experts.

C# Immediately showing added row in datagridview

12
Hi all
I have a strongly typed main form with a datagridview binded to an access database. On this main form I have a button that when clicked opens another form(open) to insert a new record into the database. Now when I close the open form it saves the changes to the database, but I cant get it to immediately display on the main form datagridview.

This is the code in the open form

Expand|Select|Wrap|Line Numbers
  1. unitTableTableAdapter.Insert(DateTime.Now, techTextBox.Text, unitComboBox.Text, modelTextBox.Text, serialTextBox.Text, problemTextBox.Text, loanModelTextBox.Text, loanSerialTextBox.Text, loanDeptTextBox.Text);
  2. unitTableTableAdapter.Update(trackerDataSet.UnitTable);
  3.  
How can I get the datagridview updated once the open form closes?

Thanks
May 5 '07 #1
0 989

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: mike | last post by:
I have a datagridview control and a button on the windows form. I am adding a new row in button click event. When the number of rows grow, the newly added row will not be visible but a scroll bar...
0
by: MKBender | last post by:
Hello everyone, What I'm currently trying to do is allow a user to add a row to my datagridview. I have AllowUserToAddRows set to true. And the empty now does appear at the bottom of my data. ...
2
by: kristian | last post by:
Hi all I have a datagridview, and I want it to show and enable editing of a table in my mysql database. I get the results from the sql-query into the dataset, and when I view the dataset in...
4
by: craig.wenger | last post by:
I am using a DataGridView to display information stored in classes. I am linking to the information with the Tag property of the DataGridView rows. Unfortunately, whenever I set the Tag property,...
4
by: =?Utf-8?B?UmludSBHb3BhbGFrcmlzaG5hIFBpbGxhaQ==?= | last post by:
Hi All, I have an application that fetch data thru a store proc and display in a datagrid, but after successful execution of proc the data grid is not visible.Please go thru the following code...
0
by: JB | last post by:
Hi All, I have a DataGridView with a column showing a combo box containing non binded values (i.e. I set the values in the Combo myself using ComboBoxColumn.Items.Add). I also want this Combo...
2
by: sreenu123 | last post by:
Hi I already bind a DataGridView to a databse. My DataGridView is showing column names as it is in the table. I want to show user-friendly column names in the grid instead of column names in the...
0
by: ZSvedic | last post by:
Hi all, I need to display DataRows with RowState.Deleted inside DataGridView, in a way that such rows have strikethrough font. Here is the screenshot how it should look like:...
3
by: frenzy99 | last post by:
Can some one help me with this problem. I want to sort DataGridView based on the order in which values were added, not on the basis of any particular column, unlike the functionality provided by...
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
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,...
0
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...
0
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,...
0
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...
0
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,...

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.