I have a UltraGrid the row layout style set as below.
grid.DisplayLayout.Bands[0].RowLayoutStyle = RowLayoutStyle.GroupLayout;
Usually when I want to perform an action on column resize I use the AfterColPosChanged event. However this event is not fired and testing suggests it is due to the RowLayoutStyle being set.
What event can I handle when the row layout style is set to GroupLayout?
ThanksPaul
Hello Paul,
I can see the issue now. You could narrow it even more by checking if the item is a 'HeaderBase' and add one more else - something like this:
if (e.RowLayoutItem is UltraGridColumn) { // If the RowLayoutItem is an instance of UltraGridColumn, then cells associated // with that column are being resized. UltraGridColumn column = (UltraGridColumn)e.RowLayoutItem; Debug.Write("Cell in row-layout resized. Column = " + column.Header.Caption); } else if (e.RowLayoutItem is HeaderBase) { // If the RowLayoutItem is an instance of HeaderBase, then column header (also // referred to as column label) is being resized. HeaderBase header = (HeaderBase)e.RowLayoutItem; Debug.Write("Header in row-layout resized. Header = " + header.Caption); } else { // if the item is a CellLayoutItem.............. // }
Please let me know if I misunderstood you requirement, I will be glad to assist you further.
Hi Boris,
I can see your example working. It has allowed me to narrow the problem down to the UltraGridGroups I create during InitializeLayout which are causing the problem.
However I can not see how they are causing the problem. I have attached a sample which demonstrates the problem.
Once again any help is greatly appreciated.
Many ThanksPaul
Hi,
My bad. It is attached to the above post now.
I can't see the attached application?
Hello,
I tried this code in my sample and was not able to reproduce the null exception. I attached the application I am using to this post for you. Please review it and feel free to let me know if I misunderstood you or if you have any other questions.