Hi Infragistics Team ,
we are used Eraly version 10.0 now upgrading 2015 v1 pack .
I have one doubt ? see below code :
private void ExcelExporter_EndExport(object sender,EndExportEventArgs e)
{
//Set the header for the excel sheet
e.CurrentWorksheet.Rows[0].Cells[0].CellFormat.Font.Bold = ExcelDefaultableBoolean.True;
e.CurrentWorksheet.Rows[0].Cells[0].CellFormat.Font.Height = 300;
e.CurrentWorksheet.Rows[0].Cells[0].Value = settings.Header;
//Wrap text for the columns if its content is large
foreach(WorksheetColumn column in e.CurrentWorksheet.Columns)
if(column.Width > 30000)
column.CellFormat.WrapText = ExcelDefaultableBoolean.True;
column.Width = 30000;
}
Click Event(Export Data) using the code
================
ExcelExporter.EndExport += ExcelExporter_EndExport;
Above code is 10.0 version , this Event (End Export) is not available in 2015 v1 pack version . in this version which event is equal, we can't assign delegate event in latest version .
latest version Event are CellExported, cellexporting, on exported, onexporting etc ..
pls suggestion me which event is same in latest version 2015 v1 pack .
Hello Nagarajan,
Thank you for posting in our forum.
EndExport event was deprecated in Infragistics 2011 Volume 1. You may use ExportEnding and ExportEnded events as replacement for EndExport event. More information related to this you may find by following the next link http://help.infragistics.com/Doc/WinForms/current/CLR4.0/?page=Whats_New_Exporter_Events.html.
Please let me know if you need any additional information.
Thank you for using Infragistics Controls.
Thanks For Replay Milko,
Now we are using Infragistics 2015 v1 Volume . please tell me which event replace in 2015 v1Volume . yuor' said 2011 v1 pack . this event Not available in 2015 v1 Volume.
Hi Milko,
Please replay for above conversation . I want to know which event is replaced in infragistics 2015 v1 volume .
Thank you for your feedback.
I think I was not clear enough in my first answer. Starting form Infragistics for WindowsForms 2011 Volume 1 EndExport is obsolete. In all later versions, including Infragistics 2015 Volume 1, two new events were introduced – ExportEnding and ExportEnded.
I have created for you a small sample project with Infragistics 2015 Volume 1 showing how you can use these new events.
Please check my sample and let me know if you need any additional information.
We are using webapplication . not windows Forms . hear attached screen shot look on it . not available that two event's .
Hi,
To achieve the same you should use the OnRowExported event of the WebExcelExporter and you will need to determine when the last row has been exported. Please let me know if you would need assistance in achieving this.
public void WebExcelExporter1_RowExported(object sender, ExcelRowExportedEventArgs e) {
if (e.GridRow != null && e.GridRow.Index == WebDataGrid1.Rows.Count - 1) { // your code } }
Thanks For Replay Hristo,
My problem is if export to excel sheet . it's default it's font size Bold. how to change the regular font size . I follow up ur' code . I have some Error . see below code .
WebDataGrid exportGrid = new WebDataGrid();
exportGrid.Font.Bold = true;
exportGrid.BorderStyle = BorderStyle.None;
exportGrid.Font.Size = 10;
exportGrid.DataSource = dtData;
exportGrid.DataBind();
Infragistics.Documents.Excel.Workbook workbook = new Infragistics.Documents.Excel.Workbook();
Worksheet worksheet = workbook.Worksheets.Add("Sheet1");
worksheet.Rows[0].Cells[0].Value = this.settings.Header.ToString();
worksheet.Rows[0].Cells[0].CellFormat.Font.Bold = ExcelDefaultableBoolean.True;
worksheet.Rows[4].Cells[0].CellFormat.Font.Bold = ExcelDefaultableBoolean.True;
int rowOffset = 4;
int columnOffset = 0;
ExcelExporter.RowExported += ExcelExporter_RowExported;
ExcelExporter.Export(exportGrid, worksheet, rowOffset, columnOffset);
ExcelExporter_RowExported Event :
======================
e.Worksheet.Rows[0].Cells[0].CellFormat.Font.Bold = ExcelDefaultableBoolean.True;
e.Worksheet.Rows[0].Cells[0].CellFormat.Font.Height = 300;
e.Worksheet.Rows[0].Cells[0].Value = settings.Header;
foreach (WorksheetColumn column in e.Worksheet.Columns)
if (column.Width > 30000)
in RowExported Event , I have set the column wise wraptext property . in this event I can't set the regular font size . pls help on this . I have set font is bold for only first row & 4th row. but it's appear All row's & columns. hear attached screen shot . please help on this Thanking You.
Hi Hristo,
Please discard above conversation. now am setting Regular font size in Excel sheet . Thanking you.