private void ServiceDataGrid_RowValidating(object sender, RowValidatingEventArgs args) { if (ServiceDataGrid.IsAddNewIndex(args.RowIndex)) { var service = args.RowData as Service; var error = getManager.Service.Validate(service); if (error.Count > 0) { args.IsValid = false; foreach (var item in error) { args.ErrorMessages.Add(item.Key, item.Value); } } } }
private void BtnPdfServices_OnClick(object sender, RoutedEventArgs e) { var options = new PdfExportingOptions() { AutoColumnWidth = true, AutoRowHeight = true, ExcludeColumns = new List <string>() { "Id", "btn" }, ExportDetailsView = true }; var document = ServiceDataGrid.ExportToPdf(options); GeneratePDF(document); }