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
235
Binding collections to ultragrid
posted

Hi

I am facing a problem in binding collection of my objects to grid. Though I have solved the problem, but I am not able to understand why it was creating error.

I have a class with several properties with all the properties have "[System.ComponentModel.Browsable(false)]" attribute. When I am binding this class to datagrid, it is not getting bound to grid. But when I removed the atribubte from properties, it got bound without any problem.

I know that Browsable(false) attribute makes a property invisible in properties window at design time.

 Please help me understand why it is not available at run time

  • 235
    posted

    Thanks for ur answer

  • 17259
    Verified Answer
    Offline posted

    That's exactly what caused that. The grid won't show any column for a property with Browsable(false).

    Actually, the "design time" you mentioned is a small "run time". For example, when you create a user control with a property and you drag one into your form, the designer is creating an instance of your user control from your assembly and shows it, that's why it tells you to build if you change the user control. So the property grid is working exactly like the UltraGrid.