Replies
Hi,
We have used Value list in the combo box editor to bind values inside the WinGrid, the above solution is working for us.
Can you please provide the sample project in VB.NET and it is very critical.
Hi,
The word LTIRA a keyword to search to set Percentage format but for the format we have set for the column as decimal, below is the code snippet:
Dim EditorSettings As New DefaultEditorOwnerSettings
EditorSettings.DataType = GetType([Decimal])
EditorSettings.Format = "###,###,###,##0.00%"
Dim editor = New EditorWithText(New DefaultEditorOwner(EditorSettings))
e.Row.Cells("fqtd_act_qtd").Editor = editor
The above code is in the Grid Event : InitializeRow and we are getting the format properly while export we have added the below code:
Private Sub MyGridExporter_CellExporting(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.ExcelExport.CellExportingEventArgs) 'Handles MyGridExporter.CellExporting
Dim cell As Infragistics.Win.UltraWinGrid.UltraGridCell = e.GridRow.Cells(e.GridColumn)
Dim _theCellFormat As IWorksheetCellFormat = Nothing
Dim theHeaderFormat As IWorksheetCellFormat = e.Workbook.CreateNewWorksheetCellFormat()
theHeaderFormat.FormatString = "0.00%;[Red](0.00%)"
e.CurrentWorksheet.Rows(41).Cells(2).CellFormat.SetFormatting(theHeaderFormat)
End Sub
In the CellExporting event how we need find for each cell what is the format assigned in the grid.
Please let us know and provide sample project in VB.net.
Hi,
Can you please update on this, it is very critical.
Provide a solution.
We have tried the below code provided by you in VB.NET:
Private Sub MyGridExporter_CellExporting(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.ExcelExport.CellExportingEventArgs) 'Handles MyGridExporter.CellExporting
Dim cell As Infragistics.Win.UltraWinGrid.UltraGridCell = e.GridRow.Cells(e.GridColumn)
Dim _theCellFormat As IWorksheetCellFormat = Nothing
If cell.Text = "LTIRA" Then
Dim theHeaderFormat As IWorksheetCellFormat = e.Workbook.CreateNewWorksheetCellFormat()
theHeaderFormat.FormatString = "0\%"
e.CurrentWorksheet.Rows(41).Cells(9).CellFormat.SetFormatting(theHeaderFormat)
End If
End Sub
But still we are not getting the percentage format in excel. We are following this to show percentage in a particular row.
Kindly provide sample VB.NET project with more detail code
The solution which you have given is normal combo editor.
We are using multi select drop down list inside the UltraWinGrid, so please provide sample project for the in VB.NET.
Hi,
Now we are getting the percenage format in the Grid but while exporting the grid percentage format is not coming in the excel.
Kindly send sample project for the same.