Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RowChanged Event Class
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
RowChanged Event Class
Divers
Thread ID:
01428065
Message ID:
01428065
Vues:
97
Instead of calling this:
private void CommitChanges(DataSet ds)
{    
	foreach (DataTable dt in ds.Tables)    
	{        
		foreach (DataRow dr in ds.Tables)        
		{            
			dr.EndEdit();        
		}    
	}
}
why not do this when I create the table:
dt.ColumnChanged += new DataColumnChangeEventHandler(dt_ColumnChanged);
then in the event do this:
void dt_ColumnChanged(object sender, DataColumnChangeEventArgs e){    e.Row.EndEdit();}
This would fire each time the user changes a bound item on a form, wouldn't it? If so, them I'm assured that the table's rowstate
would always show modifed for changed items.
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform