Can someone give me example of how to export the ultralistview to excel. If time permits, can you send an sample project.
Hello,
I am just checking about the progress of this issue. Let me know If you need my further assistance on this issue?
Thank you for using Infragistics Components.
Issue is complete.
DataTable WarningDataTable = new DataTable(); DataTable InfoDataTable = new DataTable(); DataTable ErrorDataTable = new DataTable(); WarningDataTable.Columns.Add(new DataColumn("WARNING", typeof(string))); InfoDataTable.Columns.Add(new DataColumn("INFORMATION", typeof(string))); ErrorDataTable.Columns.Add(new DataColumn("ERROR", typeof(string))); DataRow warningRow = null; DataRow InformationRow = null; DataRow errorRow = null; foreach (var row in this.ultraListViewWarnings.Items.Cast<UltraListViewItem>()) { warningRow = WarningDataTable.NewRow(); warningRow["WARNING"] = row.Text; WarningDataTable.Rows.Add(warningRow); } foreach (var row in this.ultraListViewMessages.Items.Cast<UltraListViewItem>()) { InformationRow = InfoDataTable.NewRow(); InformationRow["INFORMATION"] = row.Text; InfoDataTable.Rows.Add(InformationRow); } foreach (var row in this.ultraListViewErrors.Items.Cast<UltraListViewItem>()) { errorRow = ErrorDataTable.NewRow(); errorRow["ERROR"] = row.Text; ErrorDataTable.Rows.Add(errorRow); } //Clear ultra grids notificationWarningGrid.DataSource = null; notificationInformationGrid.DataSource = null; notificationErrorGrid.DataSource = null; //Set ultragrids notificationWarningGrid.DataSource = WarningDataTable; notificationInformationGrid.DataSource = InfoDataTable; notificationErrorGrid.DataSource = ErrorDataTable; notificationWarningGrid.DisplayLayout.Bands[0].Columns[0].Width = 150; notificationInformationGrid.DisplayLayout.Bands[0].Columns[0].Width = 150; notificationErrorGrid.DisplayLayout.Bands[0].Columns[0].Width = 150; After setting the ultragrids, just use the ultragridexcelexporter and you are done.