I have a grid bind to a dataset having two tables with parent child relationship. Both tables have same number of column. Grid display the tables in hierarchical view in two bands. I hide the column headers for second band. I also set the AllowColSizeing property to Syncronized to get a behavior that if I resize any column in first band, respective column in second band must be resized. But I am unable to achieve this behavior.
This assumption was based on the tip available for AllowColSizing.Synchronized as "Columns can be sized by the user. Columns in other bands are sized as well" :P
Let me check the AfterColPosChanged event.
Unfortunately the assumption is wrong. Imagine, you have two tables: Manager (parent table) with columns Name and Salary, and Employee (child table) with the same columns.How can the grid know whether Manager's salary and Employee's salary should be synchronized? It is definitely not achievable with a simple enumeration property.
If Mike doesn't have some brilliant idea, I guess the best way is AfterColPosChanged event
Perhaps I was unable to describe my problem fully.
Scenario is that my two bands have same number of columns and data. One band is associated to one table and other one is associated to a different table. I defined same columns for two bands using same keys for columns. Now I want the required behavior as i describe above. I assume that if both bands have same column at same postion with matching key, then there resizing must be syncronized.
“Synchronized” means that columns in child rows collections under different parent rows will be sized at once. This has nothing to do with different columns in parent and child band. How are you going to decide which columns in the parent and child band should be synchronized? By key? By caption? These things can be the same for two columns but it is still possible that these columns have complete different data and should not be synchronized.
I guess, you need to implement this special behavior where it is appropriate for you. I would suggest to look to AfterColPosChanged event in UltraGrid.
I want syncronized behavior for all bands in ultra wingrid. Mean to say that if i resize any column in parent band, respective column in child band also be resized to same size. But I am unable to get this behavioir. I explicitly set the sizing property to syncronized but no solution yet.