Hello,
Have a gridview that I want to export to excel using the radcontrol for winforms 2010 q2 sp1.
I’m using the ExportToExcelML class.
The problem is that in excel the time is added like for example 2001-05-09T00:00:00.000
On the gridview column I’m setting the export format string.
GridViewDataColumn gridviewColumn;
PropertyInfo propertie = Helper.GetProductieMonitorPropertie(kolom);
if (propertie.PropertyType == typeof(DateTime))
{
gridviewColumn = new GridViewDateTimeColumn();
gridviewColumn.ExcelExportFormatString = "dd.MM.yyyy";
gridviewColumn.ExcelExportType = DisplayFormatType.Text;
gridviewColumn.FormatString = "{0:d}";
}
Any suggestion?
Kind regards,
Tim van Rooijen
- Start
- End
- Duration
- Summary
- Description
- Location
- Visible
- AllDay
- AllowDelete
- AllowEdit
- UniqueID
- BackgroundID
- StatusID
- RecurrenceRule
- MasterEventID
- ResourceID
- Resource
Any suggestion from you about the field type for using them in MSSQL?I have a grid with a status column in which I want to place a red o green ball depending the bound value. I've tried to do that with the next code:
Private Sub Grid_CellFormatting(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.CellFormattingEventArgs) _ Handles gridPedidos.CellFormatting, _ gridChrono.CellFormatting, _ gridCentros.CellFormatting, _ gridIncidencias.CellFormatting, _ gridIncidenciasPFR.CellFormatting, _ gridPedidosWeb.CellFormatting e.CellElement.Image = Nothing Dim column As GridViewCommandColumn = TryCast(e.CellElement.ColumnInfo, GridViewCommandColumn) If column IsNot Nothing Then Select Case column.UniqueName Case "Txt" CType(e.CellElement.Children(0), RadButtonElement).Image = My.Resources.document_text CType(e.CellElement.Children(0), RadButtonElement).ImageAlignment = ImageLayout.Center Case "Datos" CType(e.CellElement.Children(0), RadButtonElement).Image = My.Resources.table_view CType(e.CellElement.Children(0), RadButtonElement).ImageAlignment = ImageLayout.Center End Select End If If e.CellElement.ColumnInfo.Name = "Status" AndAlso TypeOf e.CellElement.RowInfo Is GridViewDataRowInfo Then Dim Status As Integer = CInt(e.CellElement.RowInfo.Cells("Status").Value) If Status = 0 Then e.CellElement.Image = My.Resources.button_green Else e.CellElement.Image = My.Resources.button_red End If e.CellElement.Text = "" End IfEnd SubExecuting the program the status column is draw right as you can see in the image1 attached. But scrolling horizontally right and left, the red and green balls are showed in other columns (image2)
Thanks in advancee.RowElement.BackColor =
CType(_colourConvert.ConvertFromString(e.RowElement.RowInfo.Cells(_StatusColour).Value().ToString), System.Drawing.Color)