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
310
How to access a column in UltraGrid without using Index
posted

I have to access a property called "Hidden" for a column in UltraGrid. I can get this with the help of column Index but I want to access it with the column Key. Since Index is not reliable and it may change if the position of column is changed.  This Hidden property is in UltraGrid->DisplayLayout->Bands->0 Band->Columns->Here provide Item Index ->Hidden

My code is

GridTable.DisplayLayout.Bands.getItem(0).Columns.getItem(5).Hidden.

I am able to get Hidden Property with the help of this line but the problem is if the column is moved to some other position on the grid, the Index of the column will be changed. Column Key is the fixed one that never changes. I cannot pass the column Key to getItem() method since it takes only Index. For Example, if the column Key is "Volume", How to get Hidden property with the help of the Key "Volume". Please provide me some kind of solution because this is very important for my scripting.

Thanks

Vidya

Parents
No Data
Reply
  • 310
    posted

    GridTable.DisplayLayout.Bands.getItem(0).Columns.getItem(5).Hidden.

     In this line, 5 is the Index of the column "Volume" and the Key for that Index 5 is again "Volume". Forgot to mention this in my previous post.

    Thanks,

    Vidya

Children