Hi,
I have two grids - summary and history. On selecting summary row, I need to determine the summary type and based on it hide/show some columns and change the order of some columns in history grid. InitializeLayout is working only on load but not dynamically.
How can I do this in a code?
Thanks
Victor
Hi VK,
vkuzmich said: I had UseRowLayouts set to true. I changed it to false and column reordering is working now. Probably I set UseRowLayouts to true when I was configuring it to have multiline cells. Looks like I don't need it to be set to true.
I had UseRowLayouts set to true. I changed it to false and column reordering is working now.
Probably I set UseRowLayouts to true when I was configuring it to have multiline cells. Looks like I don't need it to be set to true.
Just so you know, it is possible to use RowLayouts and still use the VisiblePosition property. If the RowLayaoutColumnInfo on the column does not have an OriginX assigned to it, then the grid will fall back to using the VisiblePosition. So at some point, you must have not only turned on RowLayouts, but also modified the layout. You may have set the RowLayoutColumnInfo.OriginX explicitly, but more likely you just dragged some columns around in the designer and that's what set the property. So you could leave RowLayouts on and just Reset the OriginX on each column and that should work.
vkuzmich said:BTW, is there any doc or something where I can look into to find such information? I wasted so much time on such simple issue :-(
I guess the VisiblePosition property documentation should mention this. I will send a link to this thread over to our documentation team and ask them to update the docs.
Thank you Mike.
This is the answer of EXPERT.
BTW, is there any doc or something where I can look into to find such information? I wasted so much time on such simple issue :-(
Thank you.
VK
The only reason I can think of why VisiblePosition would not work is if you are using a RowLayout. If UseRowLayouts on the band is true, then the VisiblePosition is overrided by the RowLayoutColumnInfo properties on the column. So in the case, you would have to adjust the layout in code, which is much more complicated.
Sure. This is why I am strting with 0.
Note that you must set the columns in order so as to prevent the positoin of one column from interfering with another.
Alex