|
In a VB.Net Windows form, I have two datagridview control with a parent and child relationship. Value from two columns at the parent control is used to filter the dataset for the child control. I apply the two events on the parent control, cell click (for the mouse user) and selection change (for the keybroad user), to fill the datatable on the child control. However it breaks when FIRST open the form on the "selection change" event and it complains about the "Null reference on the value I try to pass to the child control". My guess is that when the parent control first activate and there is no data on the control (I know for sure the dataset has data for the parent control when the datatable is filled), so how do I put a "If" statement to bypass this. The value I pass to the child control are the primary key and a datatime field on the parent control dataset. - Changed TypeBruce.ZhouMSFT, ModeratorFriday, May 15, 2009 7:42 AMNot Follow up in time
-
|