Hi,
I have some fields that the label is empty. When I export the XamDataPresenter to Excel using DataPresenterExcelExporter, the header becomes the name of the Field, instead of keeping it empty. Is there any way to avoid this?
I have checked the HeaderLabelExporting event, but the Label in the field object becomes the same as the name, looks weird.
Regards,
Jason
Hi mailtochungg,
Wire up the DataPresenterExcelExporter's HeaderLabelExporting Event
void exporter_HeaderLabelExporting(object sender, HeaderLabelExportingEventArgs e) { //throw new NotImplementedException(); if (e.Field.Name == "EmployeeID") { e.Label = string.Empty; } }
Sincerely, Matt Developer Support Engineer
Hi Matt, this will work but I have to know which label is empty in advance. The layout definition in my project is saved to database and it can be changed anytime. i am looking for a more generic solution.