Home > Net >  DataGridView bound data source, how to insert or update a record a record. Without having to refresh
DataGridView bound data source, how to insert or update a record a record. Without having to refresh

Time:11-06

DataGridView bound data source, how to insert or update a record a row, without refreshing the dataGridView data source, example is shown in figure:


Reason: because there are too many data records, there are millions of data, if every insert or update a record refresh a data source, load can be slow, hope you just refreshes the current row,

CodePudding user response:

Millions of data is loaded into the list controls, not use screen table only choose need to edit the article number to operate the database.

CodePudding user response:

reference 1/f, the wise know already should good karma response:
not millions of data are loaded into the list controls, with screen table only choose need to edit the article number to operate the database,

Have been doing is screening is loaded into the list, but every time I add or edit a record, or to add new line more than a list of data, can only refresh operation data of current line (a record)?

CodePudding user response:

List control update or new 1 the data needs to be updated to the database can only update a record, of course, the SQL statement is inherently have, as for the interface does not need to refresh as long as submitted to the data table, do not need to read database refresh control again,

CodePudding user response:

Directly controls the add event

CodePudding user response:

Form controls should be bound to a free data sources (i.e. associated with the database does not produce, such as an independent DataTable, BindingList, etc.), every time after the success of the modify data, can be manually update the free data sources, the practice of the associated directly with the database (sample) of ADO.Net belong to primary operation, complicated scene does not apply,
  •  Tags:  
  • C#
  • Related