D
Dom
I've created a Custom Control -- essentially, I've beefed up the
DataGridView Control. One property is "ColumnForComment", and this
value must be between 0 and the total number of columns. So the Set
looks like this:
int m_ColumnForComment = -1;
public int ColumnForComment
set
{
if (value < 0) return;
if (value >= base.Columns.Count) return;
...
}
Now, when I include this control into a form, the designer for that
form has a line:
<control>.ColumnForComment = 5;
But it puts that line before the line that creates the columns ... so
the set sees that "value" is less that base.Columns.Count and does not
get executed.
Of course, I just moved the line to a better place, but every time I
make a simple change to the custom control, it moves it back again.
Is there a better way to handle this?
Dom
DataGridView Control. One property is "ColumnForComment", and this
value must be between 0 and the total number of columns. So the Set
looks like this:
int m_ColumnForComment = -1;
public int ColumnForComment
set
{
if (value < 0) return;
if (value >= base.Columns.Count) return;
...
}
Now, when I include this control into a form, the designer for that
form has a line:
<control>.ColumnForComment = 5;
But it puts that line before the line that creates the columns ... so
the set sees that "value" is less that base.Columns.Count and does not
get executed.
Of course, I just moved the line to a better place, but every time I
make a simple change to the custom control, it moves it back again.
Is there a better way to handle this?
Dom