private void localidadesDataSource_SubmittedChanges(object sender, Telerik.Windows.Controls.DataServices.DataServiceSubmittedChangesEventArgs e) { string errorMsg = string.Empty; if (e.HasError) { e.MarkErrorAsHandled(); errorMsg = string.Format("Error: {0}", e.Error.Message); if (e.Error.InnerException != null) { errorMsg += string.Format("\r\nExtra error info: {0}", e.Error.InnerException.Message); } this.statusInfo.Text = errorMsg; //this.localidadesDataSource.RejectChanges(); // It does not remove the (invalid) row from the grid (if new record) this.localidadesDataSource.CancelSubmit(); return; } this.statusInfo.Text = "Cambios guardados exitosamente."; }
private void OnDataSourceSubmittedChanges(object sender, Telerik.Windows.Controls.DataServices.DataServiceSubmittedChangesEventArgs e) { if (e.HasError) { e.MarkErrorAsHandled(); this.txtDebug.Text = string.Format("<-- Server returned the following error: {0}\r\n", e.Error); if (e.Error.InnerException != null) { this.txtDebug.Text += string.Format("<-- Extra error info: {0}\r\n", e.Error.InnerException.Message); } } }
private void paisesDataSource_SubmittedChanges(object sender, Telerik.Windows.Controls.DataServices.DataServiceSubmittedChangesEventArgs e) { string errorMsg = string.Empty; if (e.HasError) { e.MarkErrorAsHandled(); errorMsg = string.Format("Error: {0}", e.Error.Message); if (e.Error.InnerException != null) { errorMsg += string.Format("\r\nExtra error info: {0}", e.Error.InnerException.Message); } this.statusInfo.Text = errorMsg; // A Load event will be triggered //this.paisesDataSource.RejectChanges(); } }
private void OnDataSourceSubmittedChanges(object sender, Telerik.Windows.Controls.DataServices.DataServiceSubmittedChangesEventArgs e) { if (e.HasError) { e.MarkErrorAsHandled(); this.txtDebug.Text = string.Format("<-- Server returned the following error: {0}\r\n", e.Error); if (e.Error.InnerException != null) { this.txtDebug.Text += string.Format("<-- Extra error info: {0}\r\n", e.Error.InnerException.Message); } // The DataPager control is still disabled! // only when new item. Delete/Edit work fine. if (this.dataServiceDataSource.HasChanges) { this.dataServiceDataSource.RejectChanges(); } } }