Hi,
In our application we allow users to save customizations they have made to a grid to a database. The issue we have is that the fields in that grid are always changing and whenever a field is dropped from the field layout definition this then breaks all the saved customizations. We either have to manually go in and tweak all the XML in the database or we have to ask the users to create their saved view again. As you can imagine, neither is a particularly satisfying solution.
Is there a way we can make LoadCustomizations not fall over when a column no longer exists? And if not, can this be raised as a feature request to allow the method to ignore missing fields.
(Let me know if you require a sample attachment but it is quite simple to recreate yourself. Create a grid with two fields and extend the column width of both. Save the customization xml. Then delete one of the field definitions, reload the app and attempt to load the customization xml and it will not apply the column width to the column that does still exist).
thanks,
Karan
HI Karan,
I followed your steps and reproduced your issue.
I will bring this to the attention of our developers.
Sincerely, Matt Developer Support Engineer
HI,
This is not bug,
The Load/Save Customization methods are designed to load and save end user customizations to the grid. Since removing a Field from the FieldLayout definition is not something the end user can do, the Load/Save customizations feature does not track this activity. That said, if the end user hides a field using the field chooser dialog the Load/Save feature will track that and restore the visibility of the field when LoadCustomizations is called
Hi Matt,
The Infragistics Winforms Grid certainly did not work this way. It could handle missing fields fine.
We have a grid with hundreds of fields and from time to time new fields are added (which works fine.. by your answer above this should not work either because users cannot add new fields), and some fields are renamed or deleted. This feature becomes almost unusable if every time a field is deleted it breaks all the user saved customizations.
thanks
If you have additional questions regarding this feature, you should contact our Developer Support Manager: dsmanager@infragistics.com
Sincerely,
MattDeveloper Support Engineer
I also need solution of same problem. Can we get this feature in next release.
BR
Nadeem
we have the same problem like Karan (we use Version 11.1).What about the feature request?Is ther a plan to release that feature?Thanks for your feedback.
Best regards,Christine
H iKaran,
Thanks for your feedback. A feature request has been submitted for this issue.
That workaround helps. We bind to a DTO and don't have complete control over its contents so sometimes fields will be removed from there and conversely we have to remove from field layout definitions else the binding breaks. However, at least we know that by not deleting the field from the DTO and by setting the visibility of the field layout definition we can avoid invalidating saved profiles.
I still hope in future release the grid can handle missing field layouts though.
Thanks for your help,