Exporting Displayed values of the Grouping Grid

Hi, We are exporting the grouping grid to a text file by looping through the DisplayElement collection. Depending on the Element type (GridCaptionRow, RecordRow, etc..) we are taking appropriate action to write the displayed cell value to a text file. The problem is we have logic in PrepareViewStyle that intercepts what gets printed out to the grid (screen) and displays what we want (e.g. if (fieldName = "LastName") e.Inner.Style.Text = "My Text"; ) . Is the value we interject persisted anywhere ? It displays on the grid as expected but if the user wants an export of what is currently displayed on the grid then in our export function we seem to have to go through the same conditional logic as in PrepareViewStyle to generate the displayed values (e.g. "My Text) again and write them out to a text file. Is this necessary since we are replacing what is outputted to the display with our own values?

1 Reply

ST stanleyj Syncfusion Team January 30, 2006 10:14 AM UTC

Hi Erlly, Please try shifting your code which is in the PrepareViewStyleInfo handler to the QueryCellStyleInfo handler to see if that helps. One more thing to try, while retrieving the displayed cell value, try retrieving the FormattedText. Best regards, Stanley

Loader.
Up arrow icon