Hi everyone,
I have a strongly typed dataset, with my main form having a datagridview that is binded to an access database. The main form has three buttons one to create a new entry in the database one to edit an entry in the database and one to close an entry in the database. All three buttons work in the similar way, such that the entry you select in the datagridview is the entry you want to close or edit. When I click on the open...
User Profile
Collapse
-
C# - Updating a dataset in different forms.
-
C# Immediately showing added row in datagridview
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
...Code:unitTableTableAdapter.Insert(DateTime.Now,
-
I did something like this using C#
(cast)datagridv iew.currentrow. cells[i].value;
i is the cell you want to get the value of in the currently selected row. -
So this is what I have for the databinding method
I the call this in my edit button click event.Code:public void Refresh() { unitTableDataGridView.DataSource = unitTableBindingSource; }
my edit button click opens another form to edit the currently selected row.
Even after I updated the database it still does not show in the datagridview. Am I missing...Leave a comment:
-
Refreshing Datagridview C#
Hi,
I know this question has been asked many many times and I think I found the answer to this question to be to rebind the dataset. But my question is where do I do this. I have a main form that has a datagridview that displays data from an access database. I have three buttons to create a new entry edit and entry and close an entry. So where do I rebind the dataset after I have completed one of these tasks. I also have this set up as... -
WooooWhooo.
I got it with datagridview.cu rrentrow.cells[0].value
Thanks for the helpLeave a comment:
-
Alright I just tried it with C# but it does not have an Item() property.
Any ideas?Leave a comment:
-
sweet thanks mahesh. I am actually using c# but I think they should have the same properties....Leave a comment:
-
Thanks for looking.
I currently do have the details view for the cell value I want from the datagrid and I will be using sql queries to get the data.Leave a comment:
-
Selecting a cell from a datagrid
Hey everyone,
I have a datagrid that I would like to get the value of a cell that a user clicks on. Say a user clicks on the first row can I get the value of the cell in the first column, or any column for that matter.
Thanks -
awesome thanks.
Is this a stored procedure or can I just use the DECLARE keyword in the form code?...Leave a comment:
-
Inserting foreign keys
Hi everyone,
I have a couple tables(Customer ,Car, and Reservation). Each has its own primary key(CusId, CarId, ResId) and the Reservation table contains foreign keys CusId and CarId.
I have a Reservation form that asks for the customers first and last name,the customer should already be listed in the customer table, and what kind of car they want for the reservation.
My question is how do I find the CusId and CarId keys from...
No activity results to display
Show More
Leave a comment: