Updating data in datagrid

Also, I have no knowledge if a separate Data Table is linked (i.e. Making a change to the Data Table may or may not translate to changing the data stored in the Data Grid View. NOTE to Above: I do not have VS running, so I'm not sure if that code is 100% accurate, but it should give you the idea. I suspect they do something different than what seems obvious to me. Assuming that you have the row index to modify in variable Data Table vehicle = data Source. As a comment, I am interested to know if there is any difference between your version of adding a column and the version I use: For developers facing the same issue, here is how I fixed mine: You can make use of the Set Field method to update the data in the Grid's row. Set Field(4, "Updating the 5th column in the grid"); vehicle. In any case, please see the code I have listed below for my update Data Grid event. Can you post the Action Query and Retrieve Courses functions?With this code, the DB is updated using the old data in the datagrid prior to the users changes, why is this and how can I take the new data out of the grid after the user makes changes? private void courses Data Grid_Update Command(object source, System. We'll get down to the bottom of it somewhere in here.If that is within a datatable, be sure that you are accepting changes before going forward to your data layer.

The Data Grid is not set up to a data source, or a data adapter, so everytime I make a change I send the cell information to another object which forms an SQL query and makes the query to the DB (actually to a DBFacade object). Data Grid Command Event Args e) Jon Agiato Hi Ian, and thanks for the reply.In any case, please see the code I have listed below for my update Data Grid event. Is that data that you are passing into the function being stored in a datatable or is it directly updating your database layer?With this code, the DB is updated using the old data in the datagrid prior to the users changes, why is this and how can I take the new data out of the grid after the user makes changes? private void courses Data Grid_Update Command(object source, System. If that is within a datatable, be sure that you are accepting changes before going forward to your data layer.Also, try putting debug info throughout and see where the miscommunication is occurring. Ian "Jon Agiato" wrote: Hi Ian, and thanks for the reply.The application is set up using the layers pattern.

Search for updating data in datagrid:

updating data in datagrid-26updating data in datagrid-77updating data in datagrid-73updating data in datagrid-87

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “updating data in datagrid”