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
400
Programmatically adding columns
posted

Hi!

I add columns to my grid using custom code. However when I set some data on my binding source, additional columns are added depending on data. Is it possible the grid layout not to be affected while binding data? I remember that in some standard microsoft grid there was a propery call AutomaticallyGenerateColumns which was doing exactly this. Is there something like it on ultragrid?

  • 469350
    Verified Answer
    Offline posted

     Hi, 

    No, there is no AutoGenerateColumns property on the grid. The grid will always create all of the columns that exist in the data source. You cannot remove a bound column. But you can hide a column using the Hidden property. You would typically do this in the InitializeLayout event of the grid.