/// <summary> /// handles element exporting when exported to excel /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgConsensusEstimate_ElementExporting(object sender, Telerik.Windows.Controls.GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e, isGroupFootersVisible: false); RadGridView_ElementExport.ElementExporting(e, hideColumnIndex: new List <int> { 1, 12 }); }
/// <summary> /// Grid Element Exporting /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void radGridSnapshot_ElementExporting(object sender, GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e, isGroupFootersVisible: false, cellValueConverter: () => { object result = e.Value; if (e.Value == null && e.Element == ExportElement.Cell) { GridViewDataColumn column = (e.Context as GridViewDataColumn); if (column != null) { if (column.DisplayIndex == 0) { MarketSnapshotPerformanceData data = column.DataControl.Items[++itemIndex] as MarketSnapshotPerformanceData; if (data != null) { result = string.Format("{0}{1}{2}", data.MarketSnapshotPreferenceInfo.EntityNodeValueName , String.IsNullOrEmpty(data.MarketSnapshotPreferenceInfo.EntityNodeValueName) ? "" : " " , data.MarketSnapshotPreferenceInfo.EntityName); } } } } return(result); }); }
/// <summary> /// handles element exporting for grid /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgRelativePerformance_ElementExporting(object sender, GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e, () => { if (e.Value is RelativePerformanceData) { RelativePerformanceData value = e.Value as RelativePerformanceData; if (value != null) { decimal totalValue = value.AggregateCountryAlpha.HasValue? value.AggregateCountryAlpha.Value:0; countryTotal = GetValueInBasisPoints(totalValue.ToString()); } return(value); } if (e.Value is RelativePerformanceCountrySpecificData) { RelativePerformanceCountrySpecificData value = e.Value as RelativePerformanceCountrySpecificData; string result = String.Empty; if (value.Alpha != null) { decimal totalValue = 0M; result = Decimal.TryParse(value.Alpha.ToString(), out totalValue) ? GetValueInBasisPoints(totalValue.ToString()) : String.Empty; } return(result); } if (e.Value == null) { GridViewDataColumn column = (e.Context as GridViewDataColumn); if (column != null) { if ((!String.IsNullOrEmpty(column.Header.ToString()) && String.Equals(column.Header.ToString(), "Total", StringComparison.CurrentCultureIgnoreCase))) { return(countryTotal); } } } if (e.Element == ExportElement.FooterCell) { decimal totalValue = 0M; string value = Decimal.TryParse(e.Value.ToString(), out totalValue) ? GetValueInBasisPoints(totalValue.ToString()) : "Total"; return(value); } return(e.Value); }); }
/// <summary> /// dgFinancialReportExt ElementExporting EventHandler /// </summary> /// <param name="sender"></param> /// <param name="e">GridViewElementExportingEventArgs</param> private void dgFinancialReportExt_ElementExporting(object sender, GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e, hideColumnIndex: new List <int> { 1, 14 }, headerCellValueConverter: () => { if (e.Value == null) { return(null); } return(e.Value.ToString().Replace("A", "E")); }); }
/// <summary> /// Element Exporting Event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgPortfolioDetails_ElementExporting(object sender, GridViewElementExportingEventArgs e) { if (e.Element == ExportElement.Row) { var value = e.Value as PortfolioDetailsData; if (value.Children != null) { foreach (var child in value.Children) { e.Value = child; RadGridView_ElementExport.ElementExporting(e, isGroupFootersVisible: false); } } else { RadGridView_ElementExport.ElementExporting(e, isGroupFootersVisible: false); } } else { RadGridView_ElementExport.ElementExporting(e, isGroupFootersVisible: false); //The following section is used for reformatting in exported file RadGridView_ElementExport.ElementExporting(e, isGroupFootersVisible: false, cellValueConverter: () => { object result = e.Value; if (e.Value != null && e.Element == ExportElement.Cell && e.Value.ToString() != "") { GridViewDataColumn column = (e.Context as GridViewDataColumn); if (column != null && (column.Header.ToString() == "Target %" || column.Header.ToString() == "Portfolio %" || column.Header.ToString() == "Benchmark %" || column.Header.ToString() == "Active Position %" || column.Header.ToString() == "Upside %")) { decimal?resultInt = 0; resultInt = Convert.ToDecimal(result); //resultInt = ? 0 : Convert.ToDecimal(result); resultInt = resultInt / 100; result = resultInt.ToString(); } } return(result); }); } }
/// <summary> /// Element Exporting for Export to excel /// </summary> /// <param name="sender"></param> /// <param name="e">event object</param> private void dgICPPresentationsList_ElementExporting(object sender, Telerik.Windows.Controls.GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e); }
private void dgQuarterlyResults_ElementExporting(object sender, GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e, isGroupFootersVisible: false); }
/// <summary> /// Element Exporting Event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgDCFAnalysisSummary_ElementExporting(object sender, Telerik.Windows.Controls.GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e); }
/// <summary> /// Syles added to Export to Excel /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgCOASpecific_ElementExporting(object sender, GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e, hideColumnIndex: new List <int> { 1, 8 }); }
/// <summary> /// Event for Grid Export /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ElementExportingEvent(object sender, GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e); }
/// <summary> /// handles element exporting when exported to excel /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgFinstat_ElementExporting(object sender, Telerik.Windows.Controls.GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e, isGroupFootersVisible: false); }
/// <summary> /// Element Exporting Event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgTerminalValueCalculations_ElementExporting(object sender, Telerik.Windows.Controls.GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e); }
/// <summary> ///Adding styles to export /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgTopTenBenchmarkSecurities_ElementExporting(object sender, GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e, isGroupFootersVisible: false); }
/// <summary> /// Element Exporting for Export to excel /// </summary> /// <param name="sender"></param> /// <param name="e">event object</param> private void dgUnrealizedGainLoss_ElementExporting(object sender, Telerik.Windows.Controls.GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e); }
/// <summary> /// Excel exporting EventHandler /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgConsensusEstimateValuations_ElementExporting(object sender, Telerik.Windows.Controls.GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e, hideColumnIndex: new List <int> { 1, 12 }); }
/// <summary> /// dgICPSummaryReport ElementExporting EventHandler /// </summary> /// <param name="sender"></param> /// <param name="e">GridViewElementExportingEventArgs</param> private void dgICPSummaryReport_ElementExporting(object sender, GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e); }
/// <summary> /// Styles added to Export to excel /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgMacroDBKeyReport_ElementExporting(object sender, Telerik.Windows.Controls.GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e, hideColumnIndex: new List <int> { 1, 8 }); }
/// <summary> /// handles element exporting for grid /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ExcelElementExporting(object sender, Telerik.Windows.Controls.GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e); }
/// <summary> /// dgFinancialReport ElementExporting EventHandler /// </summary> /// <param name="sender"></param> /// <param name="e">GridViewElementExportingEventArgs</param> private void dgFinancialReport_ElementExporting(object sender, GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e, hideColumnIndex: new List <int> { 1, 14 }); }
/// <summary> /// dgHoldingsPercentageRegion ElementExporting event handler /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgHoldingsPercentageRegion_ElementExporting(object sender, Telerik.Windows.Controls.GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e); }
/// <summary> /// Element Exporting Event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ExcelElementExporting(object sender, GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e, isGroupFootersVisible: false); }
/// <summary> /// handles element exporting for export to excel /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgRegionBreakdown_ElementExporting(object sender, GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e, isGroupFootersVisible: true, aggregatedColumnIndex: new List <int> { 1, 2, 3 }); }
/// <summary> ///Styles added to Export /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgPerformanceGraph_ElementExporting(object sender, Telerik.Windows.Controls.GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e); }
/// <summary> /// handles element exporting /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgIndexConstituents_ElementExporting(object sender, GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e, isGroupFootersVisible: false); }
/// <summary> /// Helper method Export /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgRelativePerformanceUI_ElementExporting(object sender, GridViewElementExportingEventArgs e) { RadGridView_ElementExport.ElementExporting(e); }