Hey,
I want to export a grid that has combo editor fields. My problem is that, by default, it is exporting the values and not the display members.
Looking at the excel exporter, I saw that it has a CellExporting event where I can set a custom Value on the event args. I'm guessing that this would be the ideal spot for me to somehow grab the text? My problem is that CellValuePresenter.FromRecordAndField returns null here. I want to use CellValuePresenter.Editor.Text as the Value. Am I doing something wrong? In the worst case, I suppose I could use the Cell's value to key into my drop down list and get out the displayed text myself -- is this my best option?
Thanks
This doesn't seem like correct behavior. I would have expected the display text for this field to have been exported but I have submitted an issue for this so the matter can be investigated further. In the interim you could try handling the CellExported event and set the worksheet cell's value directly. e.g.
Hi Andrew,
I am using a enum of a map (actual value,display value) in the converter. Getcelltext doesn't work in that case. Anything else you know of?
This workaround does not appear to work in 10.3. The GetCellText method simply returns the ID value of the combobox not the display text. Any help would be appreciated.
Thanks,Doug Rees
Polo Ralph Lauren
GetCellText works perfectly, thank you for your help.