Skip to content

DevExpress-Examples/how-to-prevent-certain-gridcontrols-properties-from-being-serialized-t158989

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WPF Data Grid - Exclude GridControl's Properties from Serialization

This example demonstrates how to exclude properties from serialization. To do this, handle the DXSerializer.AllowProperty event for an object whose property should not be serialized. In the event handler, set the AllowPropertyEventArgs.Allow property to False to prohibit property serialization.

In this example, the ID column's Width property is excluded. Note that since GridColumn is not a UIElement descendant, it is necessary to use the GridColumn.AddHandler method instead of DXSerializer.AddAllowPropertyHandler to subscribe to the event.

image

Files to look at

Documentation

More Examples

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)