Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1610
ultraGridExcelExporter
posted

Hi, I understand the ultraGridExcelExporter will export the grid as it appears on the screen...

Some columns on my grid use lookup tables (ValueLists), and I would like the export to export the actual value, not the text shown in the grid. Is there any option to make it happen?

Thank you

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    By default, the UltraGridExcelExporter exports the underlying cell values and then uses Excel's built-in dropdown-list functionality to translate the value into a display text, just like the grid does. 

    You are correct that turning off ExportValueLists will simply bypass this and export only the text the user sees. 

    Teodora's solution is okay and should work. But there's a simpler way. 

    What you could do is handle the ExportStarted event. This event passes you an UltraGridLayout variable in the event args. This is a cloned copy of the grid's DisplayLayout. So you could access this layout, get the band, get the column and remove the ValueList from the column (set it to null). This would essentially remove the ValueList from the export layout without affecting the on-screen grid. 

Children