Skip to content

Replies

0
Thangachan Kuriyan
Thangachan Kuriyan answered on Jul 28, 2017 5:09 PM

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.

0
Thangachan Kuriyan
Thangachan Kuriyan answered on Jul 27, 2017 7:48 AM

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.

0
Thangachan Kuriyan
Thangachan Kuriyan answered on Jul 24, 2017 5:53 AM

Hi,

Can you please update on this, it is very critical.

Provide a solution.

0
Thangachan Kuriyan
Thangachan Kuriyan answered on Jul 21, 2017 4:20 PM

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

0
Thangachan Kuriyan
Thangachan Kuriyan answered on Jul 21, 2017 10:12 AM

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.

0
Thangachan Kuriyan
Thangachan Kuriyan answered on Jul 20, 2017 11:28 AM

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.

0
Thangachan Kuriyan
Thangachan Kuriyan answered on Jul 18, 2017 1:52 PM

Hi,

We have tried the sample code which have provided in  C#.net and converted to VB.net and tried we are not getting the expected format.

can you please provide sample vb.net project code for the same.