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
75
Bind Non-Browsable proeprty to Ultragrid
posted

Hi,

There is a property(Name) which is set as Browsable(false) in order to hide it in property grid. But this property is not binded to Ultragrid. I come across Infragistics forums that a non-browsable property(i.e. a property with Browsable(false) cannot be binded to Ultragrid). Is there any workaround to bind a non-browsable property to ultragrid?

Please reply asap.

Thanks

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    This isn't really an issue with the grid. The BindingManager in DotNet will not expose properties that are Browsable(false) when data binding.

    So there is no way to bind this field.

    You could use an unbound column and get and set the values of this field in code, though.

    What you would do is use the InitializeLayout event of the grid to add an unbound column to the grid and set it's DataType appropriately.

    Then in the InitializeRow event of the grid, you can use e.Row.ListObject to get the underlying data source record from your data source and get the value of the Name field and assign it to the Value of the grid cell in the unbound column.

    If this column needs to be editable, then you will have to reverse the process, copying the grid cell value to the ListObject in the grid's BeforeRowEvent event.

Children