My question is related to the fact, that I missing feature in the UltraGrid which will work similar to "Enabled" property but when it set to false it will not disable the scrollbars. The problem with DisplayLayout.Override.AllowUpdate is that the grid actually doesn't look as disabled and it even allows entering cells to the edit mode which is very user unfriendly. Can you please add the feature request?
So for now I try to implement this functionality by myself but I have a problem that when column is being added to the grid which is "disabled" (I set all columns' CellActivation to Disabled) it is "enabled". I found that there is SubObjectPropChangeEvent being fired from ColumnsCollection, but I don't see how to determine the new column. (In case of add it is possible - it will be the last one, but what to do with insert?)
Regards,Maxim Golubitsky.
MbG said:The problem with DisplayLayout.Override.AllowUpdate is that the grid actually doesn't look as disabled and it even allows entering cells to the edit mode which is very user unfriendly
If you want a notification when a column is added/removed/changed, you can handle the binding list's ListChanged event. In the case where a column has been added/removed/changed, the ListChangedType property of the event args will be set to PropertyDescriptorAdded/PropertyDescriptorDeleted/PropertyDescriptorChanged, respectively.
I mentioned DisplayLayout.Override.AllowUpdate since it was provided as a solution to the similar question posted here and I explained why it doesn't fit my needs.
In my case the column is unbound, so I think your solution can't help.
Maxim,
I will submit this as a feature request.
Michael S.
OK, thanks, you gave me idea. When column added I'll rebuild my structure where I hold original CellActivation of each column. But why I should do your job? Please add feature request as I described in the beginning of the thread ;-)
MbG said: I mentioned DisplayLayout.Override.AllowUpdate since it was provided as a solution to the similar question posted here and I explained why it doesn't fit my needs. In my case the column is unbound, so I think your solution can't help.
Every column in the grid has a CellActivation property - it makes no difference whether the column is bound or unbound. You would, of course, have to loop through all of the column, but that's pretty easy. :)