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
920
Compare UltraGridLayout
posted

I want to save an load layouts of an ultragrid. This is no problem wih SaveAsXm. But I want to ask the User if he wants to save a changed layout.

Is there any way to compare 2 layouts (current and a  perviously saved).

 .Equals(object)  seems to have no effect.

{

UltraGridLayout LoadedLayout = ultraGrid1.DisplayLayout.Clone();
bool isEqual = LoadedLayout.Equals(ultraGrid1.DisplayLayout);  // is false

}

 

Parents
  • 469350
    Verified Answer
    Offline posted

    I don't think there is any simple way to do this. Layouts are pretty complex with lots of properties, and the Equals method will just do a reference comparison. 

    I suppose one way to do this would be to write each layout into a stream and them loop through the stream and compare each Byte. I'm not sure how efficient this would be, though. 

Reply Children