Clear ComboBox Text using C#.net
public static void ClearComBoBoxes(Control parent)
{
foreach (Control child in parent.Controls)
{
ComboBox comBox = child as ComboBox;
if (comBox == null)
ClearComBoBoxes(child);
else
comBox.SelectedIndex = -1;
}
}
{
foreach (Control child in parent.Controls)
{
ComboBox comBox = child as ComboBox;
if (comBox == null)
ClearComBoBoxes(child);
else
comBox.SelectedIndex = -1;
}
}