Hi,
Is there any property to check if the layout is changed by the user?
I am loading the layout after binding datasource and want to check if the user has modified the layout.
How to check in code whether the user has modified the layout?
Thanks
Ashok
While there is no single event of property for this, you might be able to cheat. What you could do is save the initial layout of the grid to a MemoryStream. Then when you want to check if the layout was changed, you save the grid's current layout to another memory stream. Then you can compare the streams. You would probably have to loop through the streams and compare each byte individually, so this might not be a terribly efficient way to do it. But it may be worth a shot. :)
There is nothing that you can check to see if the user has made any changes to the grid after it has been loaded, such as if a column has been moved or sorted, since the grid does not maintain any information on what its state was originally versus what its current state is. You would have to take note of whether this has happened, such as in the AfterColPosChanged or AfterSortChanged events.
-Matt