Hello, I derive DataGridViewEx class from DataGridView like this:
public class DataGridViewEx : DataGridView
{
// ...
[DefaultValue(false)]
[Browsable(true)]
public new bool AutoGenerateColumns
{
get { return base.AutoGenerateColumns; }
set { base.AutoGenerateColumns = value; }
}
public DataGridViewEx()
{
AutoGenerateColumns = false;
}
// ...
}
But, when I add my DataGridViewEx control to a form, I see that AutoGenerateColumns property is set to true! My code doesn't set it to true anywhere, so "someone else" :) sets it to true. Of course the code listed above is executed and AutoGenerateColumns is set to false for a moment, but later it becomes "true".
Any ideas?
Thank you in advance.