Hello,
I have to create numerous repository items to pair with custom grid columns so that a user can specify EditFormat properties to each column since the XtraGrid doesn't have this capability. I can't use one RepositoryItem for all of the same type custom columns as if they change the EditFormat in one repositoryItem then it applies to all columns that have this repository item assigned. So I create my repository items dynamically but they are not serialized with the GridView.SaveLayout so I need to serialize them myself so the user's settings can be restored.
Proposed Solution:
Please add a system so that I can create Repository Items at runtime and then persist this information (serialize) so that I can recall it (deserialize) later and apply it to the grid control.
Thank you.
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hello Neal,
Thank you for the suggestion. However, we are not planning to introduce this functionality in the near future, because in our opinion it will only be used in rare cases. Usually, the end user doesn't have the ability to create and assign different editor types to specific columns at runtime. If you provide the capability to specify an edit-mask, it would be a much better solution to serialize only these mask strings instead. This can be done easily using a standard XMLSerializer class. If you need, I can prepare a sample project demonstrating this approach.
Thanks,
Stan.
Thanks Stan. Sure, I'd love to take you up on your offer for a sample. I guess we need to serialize the format type properties, i.e. display format, edit format, edit mask, etc. so that a user's display and edit properties remain consistent and are persisted and restored for each column.
Thank you.
Hello Neal,
You are quite right, you should serialize/deserialize those properties you are allowing to change to the end-user. Basically you will need to create a simple object that will store these property values. A sample code can be found in the How the splitter's position can be saved on exit and restored when the application is launched next time article.
Please let me know if you still need a sample project.
I'm looking forward to hearing from you.
Thanks,
Stan.