listbox1.beginupdate(); // stop the listbox from drawing while items are added. datatable dt; int indexnum=listbox1.selectedindex; dt=(datatable)listbox1.datasource; datarow custrow = dt.rows[indexnum]; custrow.beginedit(); custrow[0] = indexnum; custrow[1]="after modify"; custrow.endedit(); dt.acceptchanges(); listbox1.endupdate();// end the update process and force a repaint of the listbox. listbox1.update();
listbox1.beginupdate(); // stop the listbox from drawing while items are added. datatable dt; int indexnum=listbox1.selectedindex; dt=(datatable)listbox1.datasource; datarow custrow = dt.rows[indexnum]; custrow.beginedit(); custrow[0] = indexnum; custrow[1]="after modify"; custrow.endedit(); dt.acceptchanges(); listbox1.endupdate();// end the update process and force a repaint of the listbox. listbox1.update();