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
300
XamDataGrid clipboard text format
posted

Hi,

I noticed when copying XamDataGrid contents to clipboard I can include the Headers via FieldLayoutSettings.CopyFieldLabelsToClipboard. When viewing in excel, the headers appear in bold format.

I would like to format contents of the grid based on bound properties - is this possible?

I have hooked into the Grid_Copying event and can check the copied DataItem from the eventArgs (e).

e.g.

var sourceRecord = e.GetSourceRecord.DataItem

//check 'ShouldBeStrikeThrough'

if(sourceRecord.ShouldBeStrikThrough)

//copy to clipboard with strike through format

I can do this by adding HTML to the clipboard and cancelling the event. This works well for excel but not a text viewer. How is the Header Bold format applied?