Dear all,
(1) If I export the ultragrid to the excel using document exporter, how to make datetime field to be only date format in excel, instead withing time format.
(2) How to make below picture strange items disappear??
Hello rchiu5hk,
I have been looking into this forum thread and you could do the steps below in order to achieve what you are looking for:
1. In order to export just the Date part you should set the CellFormat in your Worksheet to the desired one, in a CellExported event like:
private void ultraGridExcelExporter1_CellExported(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.CellExportedEventArgs e) { if (e.GridColumn.Key == "Your dateTime column key") e.CurrentWorksheet.Rows[e.CurrentRowIndex].Cells[e.CurrentColumnIndex].CellFormat.FormatString = "mm/dd/yyyy"; }
2. In order to remove the RowSelectors from your UltraGrid, you could use the InitializeLayout event of the UltraGrid to do so like:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { e.Layout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.False; }Please feel free to let us know if you have any other questions with this matter