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
130
GridColumnCollection.Contains Failed to test GridColumn
posted

My UltraWinGrid (V 9.1) behaves weird: the first screen shot show that the grid has 5 columns

however the following code:

grid.DisplayLayout.BandsSerializer[0].Columns.Contains("Gas") failed!

as screen shot 2 why?

 

 

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    This code fails because you are passing in a string. The Columns collection does not contain any strings, it contains a UltraGridColumn objects.

    You should be using the Exists method to see if a column exists with the specified key.

Children
No Data