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
40
Custom Columns Disappear When Databinding
posted

I am creating my own column (adding it to the band, confirming it's existance) and when I databind an outside source it kills all of my runtime created custom columns and auto binds everything from the data source.  My custom column then ceases to exist.

What am I missing?

Parents
No Data
Reply
  • 436
    posted

    Hi,

    The problem is that when you bind data to the grid, it replaces the any data currently on the grid - so in your case your custom columns are dropped from the grid.

    You need to change where you add the custom columns.

    You can handle the grid's "InitializeLayout" event and add your columns in there. That event is triggered when a new data source is bound to the grid - so in effect you will be adding your columns after the data is bound.

    Hope this helps!

     

Children