Hello,
I want to export grid to excel as it is shown. For example, there is a combo on a field and the valuepath and the displaymemberpath are different from each other. If I export the grid to excel the valuepath values is shown on the excel sheet. I want to export the grid with the displaymemberpath values, not with the valuepath values. How can i do that?
<igDP:Field Name="bbbb" Label="aaaa"> <igDP:Field.Settings> <igDP:FieldSettings EditorType="{x:Type inf:XamComboEditor}" AutoSizeOptions="All"> <igDP:FieldSettings.EditorStyle> <Style TargetType="{x:Type inf:XamComboEditor}"> <Setter Property="DisplayMemberPath" Value="Value" /> <Setter Property="ValuePath" Value="Code" /> <Setter Property="Value" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content}" /> <Setter Property="ItemsSource" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:DCDList}},Path=DataContext.CurrencyList, Mode=OneWay}" /> </Style> </igDP:FieldSettings.EditorStyle> </igDP:FieldSettings> </igDP:Field.Settings> </igDP:Field>
Which is the exact build version of our controls are you using?
Please also follow the following forum thread :
http://community.infragistics.com/forums/p/33293/181481.aspx#181481
Hello again,
I tried your suggestion but that does not work:
private void ExcelExporter_CellExported(object sender, CellExportedEventArgs e)
{
e.CurrentWorksheet.Rows[e.CurrentRowIndex].Cells[e.CurrentColumnIndex].Value = e.Record.GetCellText(e.Field);
}
I need to catch XamComboEditor in the cell that is in CellExportedEventArgs (e), or directly the text value of xamComboEditor. Any suggestions?