Hi:
I would like to track the Row Selector Width change and remember it. But the After Column Position
change event dose not fire on Row Selector Width change. Is there any other event I could subscribe or
how do I know the Row selector width being changed.
Hi,
There's no event specifically for the RowSelectorWidth. If you are just trying to store the width and then restore it later, then your best bet is to simply get the RowSelectedWidth at the time you do your "save". Or just save the grid's DisplayLayout using the Save method.
If you really need to trap when the RowSelectorWidth changes, then you might be able to do it using the PropertyChanged event of the grid. But this event can be very expensive in terms of performance, since it fires so often.
Why, exactly, is your RowSelector width changing in this case?
Hi Mike:
Thanks for your help. I will consider your suggestions and choose the best suitable one.
We have some text to be displayed on each row selector and they might be dynamically changed so we just set a fixed initial Selector width and allow user to resize to fit the text as needed. And it's also part of user requirement to be able to customize Selector width, Row Height and Column Width. But unfortunately Selector Width change is not part of AfterColPosChanged.
If you are setting the RowSelectorWidth in code, then you know you did it, so you don't need an event to tell you that it happened.
Are you saying that your users can click and drag the edge of the RowSelector in order to resize it themselves? I'm not aware of the grid having a feature that allows that - although it's possible it's there and I just don't remember it. :)
Yes we allow user to drag the edge of RowSelector to resize it.
Anyway I found another solution: Using Grid MouseDown and MouseUp event to check whether the RowSelectorHeaderUIElement being dragged...
Thanks.