Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
5549
Best way to format columns in a hierarchical grid ?
posted

Hi, i have a hierarchical grid , i bind 2 datasets to a grid to display data. the creation of this grid works. but whats the best way to design the outfit of the columns of band 0 (parent) and band 1 (child)

i would set the width,format (like time), hide and so on...
my my previous solution did not really work on a  hierarchical  grid.
is it only  possible in the

UltraGrid1_InitializeLayout

like
e.Layout.Bands(1).Columns("Field").Format = "dd.MM.yyyy HH:mm:ss"

is there no other solution in the init of the grid, or elsewhere

greetings martin

Parents
No Data
Reply
  • 20872
    Suggested Answer
    Offline posted

    Hello Martin,

    If I understand correctly your requirement, the best place for such modifications would be the InitializeLayout event of the UltraGrid control. Once you bind your UltraGrid, the first event that will fire would be the InitializeLayout, so you would have an access to the Layout of the Grid, and you could modify it as you wish. If there are any other dynamic changes to the layout of the UltraGrid or to the data itself, you could still modify the layout through the UltraGrid1.DisplayLayout object once the other modifications are applied to your application.

    I have tested the mentioned scenario and I do have an access to the second band. Also if the modifications are not applied you should verify that you are hooking to this event prior assigning the DataSource to your UltraGrid and also the data type of the desired "Field" column is DateTime.

    Please feel free to let us know if you have any other questions with this matter.

     

Children