J
Jeff Gaines
If there is a more appropriate newsgroup for this please tell me ![Smile :-) :-)](/styles/default/custom/smilies/smile.gif)
I am writing a "GridView" control, it looks like a List View but the Cells
are selectable individually.
I have had horrendous problems with the VS IDE (devenv.exe) crashing -
sometimes it closes so quickly it's made me jump. I have pinned it down to
the OnClear override which I have been using to clear Lists in the various
collections.
The class is declared:
public class JColumnCollection : System.Collections.CollectionBase
And the OnClear function:
protected override void OnClear()
{
JColumn column;
for (int col = 0; col < List.Count; col++)
{
column = (JColumn)List[col];
column.OnColumnChanged -= new
JColumn.ColumnChangedEventHandler(colHeader_OnColumnChanged);
}
List.Clear();
ColChangedEventArgs e = new
ColChangedEventArgs(ColChangedEventArgs.ChangeTypes.ColumnsCleared, null);
RaiseColumnChangedEventHandler(null, e);
}
I *thought* it was good practice to remove the ColumnChangedEventHandler
before clearing the List but VS doesn't like it at all.
It seems I am doing something wrong (commenting out this function allows
everything to work as designed). I would appreciate it if anybody can
throw any light on this for me![Smile :-) :-)](/styles/default/custom/smilies/smile.gif)
![Smile :-) :-)](/styles/default/custom/smilies/smile.gif)
I am writing a "GridView" control, it looks like a List View but the Cells
are selectable individually.
I have had horrendous problems with the VS IDE (devenv.exe) crashing -
sometimes it closes so quickly it's made me jump. I have pinned it down to
the OnClear override which I have been using to clear Lists in the various
collections.
The class is declared:
public class JColumnCollection : System.Collections.CollectionBase
And the OnClear function:
protected override void OnClear()
{
JColumn column;
for (int col = 0; col < List.Count; col++)
{
column = (JColumn)List[col];
column.OnColumnChanged -= new
JColumn.ColumnChangedEventHandler(colHeader_OnColumnChanged);
}
List.Clear();
ColChangedEventArgs e = new
ColChangedEventArgs(ColChangedEventArgs.ChangeTypes.ColumnsCleared, null);
RaiseColumnChangedEventHandler(null, e);
}
I *thought* it was good practice to remove the ColumnChangedEventHandler
before clearing the List but VS doesn't like it at all.
It seems I am doing something wrong (commenting out this function allows
everything to work as designed). I would appreciate it if anybody can
throw any light on this for me
![Smile :-) :-)](/styles/default/custom/smilies/smile.gif)