Home > Net > DatadridView enable delete beyond index
DatadridView enable delete beyond index
Time:09-25
Background: datadridView enable delete Function: selected line, press the Delete button, execute database Delete, Delete after a successful rebind the data source, Case description: 1, when the database (more than two) of multiple data, delete the first time, after a single-step tracking, execution process is no problem, when the bound data source data is no problem, but the result of the show was deleted a also not shown below (the bound data source is this one), the matter, if you click query or front page, back (query condition is empty, is all not delete the data query, only one page), click later, according to normal, 2, on the basis of problem 1, for the first time to delete a line, the data source through tracking is removed a line, when the show lost two lines, selected a line again, delete, the function is normal, delete the line loss, 3, when the data is only one line, complete the program code, the data source is also normal, list is empty, but when I after the code is executed, F5 to jump out of the code, in the program. The cs execution window of time at a beyond the exception of the index, if ignore this exception, press F5 to skip, interface display is normal, Above is the description about this issue, combined with code screenshots, looked great god help to find where the problem, thank you very much! The good life of peace,
CodePudding user response:
Should be there is something wrong with the constructor or the load event