kabirpatel
Programmer
Hi all,
I am new to C# windows forms and have a basic question.
I have a form which contains a datagrid. The datagrid is bound to a stored proc that takes 4 parameters.
In the Load event I do a one time initialization of the 4 parameters.
Each of the 4 parameters comes from the selected value of 4 combo boxes.
In the SelectedIndex_Changed event I reset the value of my parameter so that it matches the selected value of the combo box. I then refresh the datagrid.
The problem is that each time the datagrid is refreshed it calls the Load event and all my parameter values are overwirtten with the initialization values.
I know that in ASP.NET there is an IsPostBack property that can be used to determine whether it was the first call to the Load event, but is there something similar in windows forms?
Cheers,
Kabir