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
60
UltraGrid: strange Parent / Child bindings
posted

Hi,

I'm having an unusual problem with an ultra grid which I'm hoping has been seen before ... despite a search being unable to find anything.

I'm binding my grid to a data object (lets call it ParentObject) which has a property of List<ChildObject>. I've added a few unbound columns to the Child Object as these are then used to populate hidden fields of the Child Object. Everything seems to work OK until I attempt to resolve what should be in my unbound fields.

During the initialisation, after setting the populated data source I step through each row in each band and attempt to cast the row as either ParentObject or ChildObject depending on which band is being iterated through. My issue is that when iterating through the rows of the ChildObject band, the rows returned are in actual fact the rows within the ParentObject band!

Has anyone seen this happening before or got any suggestions?

~Daniel

Parents
  • 37774
    posted

    Daniel,

    How are you walking through the rows?  The ideal place to initialize unbound columns is to use the InitializeRow event, since this will fire when a cell value changes so that you can update the other cells if necessary, as well as do things like change appearances.

    -Matt

Reply Children
No Data