TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Koteswararao Mallisetti
NA
817
563.7k
ultragrid Header row formating
Aug 10 2010 2:34 AM
hai every one ,
this is koti i am developing windows application in that i want to export the ultraGrid data to excel sheet through UltraGridExcelExporter data will be exported successfully but the header rows can't came in excel sheet by default it was came but formatting that headers and rows i use headerRow Exporting ,RowExporting events the heading will not display what is the problem the following is the code see....
Header row exporting
Private Sub UltraGridExcelExporter1_HeaderRowExporting(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.ExcelExport.HeaderRowExportingEventArgs) Handles UltraGridExcelExporter1.HeaderRowExporting
' e.Cancel = True
Dim theHeaderFormat As IWorksheetCellFormat = e.Workbook.CreateNewWorksheetCellFormat()
theHeaderFormat.Font.Bold = ExcelDefaultableBoolean.[True]
theHeaderFormat.Font.Name = "Comic Sans"
theHeaderFormat.Font.Color = Color.Blue
theHeaderFormat.FillPatternBackgroundColor = Color.LightGray
e.GridRow.Cells(0).Value = e.GridRow.Cells(0).Text
For Each ucell As UltraGridCell In e.GridRow.Cells
If Not ucell.Hidden Then
e.CurrentWorksheet.Rows(e.GridRow.Index).Cells(ucell.Column.Index).Value = ucell.Column.Header.Caption.ToString()
e.CurrentWorksheet.Rows(e.GridRow.Index).Cells(ucell.Column.Index).CellFormat.SetFormatting(theHeaderFormat)
'MessageBox.Show(e.CurrentWorksheet.Rows(e.GridRow.Index).Cells(ucell.Column.Index).Value)
End If
Next
End Sub
row exporting
Private Sub UltraGridExcelExporter1_RowExporting(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.ExcelExport.RowExportingEventArgs) Handles UltraGridExcelExporter1.RowExporting
e.Cancel = True
If isHeader Then
_theCellFormat = e.Workbook.CreateNewWorksheetCellFormat()
_theCellFormat.Font.Bold = ExcelDefaultableBoolean.[False]
_theCellFormat.Font.Name = "Comic Sans"
_theCellFormat.Font.Color = Color.Black
For Each ucell As UltraGridCell In e.GridRow.Cells
e.CurrentWorksheet.Rows(e.GridRow.Index).Cells(ucell.Column.Index).Value = ucell.Value
e.CurrentWorksheet.Rows(e.GridRow.Index).Cells(ucell.Column.Index).CellFormat.SetFormatting(_theCellFormat)
Next
End If
End Sub
Reply
Answers (
0
)
display x symbols in place of creditcard number?
x-y axis cut a line in graphics try to fill color