The Combo's SelectedIndexChanged event *does* tend to fire before it should when you hook up the event handler from the PropertySheet. What I typically do is hook it up in the Load event handler (rather than in the constructor's InitializeComponent() method).
See if that helps ...
~~Bonnie
>Hello,
>
>On my form load in my winapp, I am loading a dataset, creating a dataview of that set, and binding a datagrid to the dataview.
>
>I am also loading a combobox with different statuses as the display, and a status value as the value. I want to filter the dataview based on that status value.
>
>I am unsure of where to put the rowfilter code. I tried to put it in the combobox.selectedindexchanged event, but I get this error:
>
>
>An unhandled exception of type 'System.InvalidCastException' occurred in microsoft.visualbasic.dll
>
>Additional information: Cast from type 'DataRowView' to type 'String' is not valid.
>
>
>because I am assuming this event is firing when the form is created and my combobox isn't loaded yet.
>
>Anybody know what I am doing wrong, or how I can avoid the error?
>
>TIA,
> MAC