Update and Insert data in database from datagridview

Update and Insert data in database from datagridview

Bhuban Shrestha

1 десятилетие назад

510,216 Просмотров

Connect with me On LinkedIn: https://www.linkedin.com/in/bhubanshrestha

Sometime user needs to update large amount of data in such case updating data from datagrid view is good choice because user gets all information in a row format. In this video tutorial you will learn how to update database table from datagrid view. You can insert, upadate and delete data of database from datagrid view.
In this video tutorial deleting is not shown but it is very simple. Just select row then update.

NOTE
You have to include primary key column in data grid view.
If you want to hide primary key column to user then you can achieve this by

datagridview1.Columns[0].Visible=false ;//0 is the index of primary key column

OR
datagridview1.Columns["PrimaryKey"].Visible=false; //PrimaryKey is a column header text of primary key.

Тэги:

#update_data_into_database_from_datagrid_view #Insert_data_into_database_from_datagrid_view #Videos_by_Bhuban_Shrestha #YouTube #delete_data_from_database_from_datagrid_view #insert_update_delete_database_record_from_datagrid_view #Playing_with_datagrid_view
Ссылки и html тэги не поддерживаются


Комментарии: