try
{
// Apply Filter Expression
this.dsSoftwareLocations1.Tables["software"].DefaultView.RowFilter = "Software=" + this.cboSoftware.Text + "";
// Gets the number of records in the DataView after
// RowFilter and RowStateFilter have been applied.
if (dsSoftwareLocations1.Tables["software"].DefaultView.Count > 0)
{
dgLocations.DataSource = dsSoftwareLocations1.Tables["software"].DefaultView;
}
else
{
MessageBox.Show("Filter criteria does not meet criteria");
}
}