using select method of dataset and binding?

Got it to work using the following.

Im still open to suggestions if there is a better way of doing this.

Code:
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");
	}
}
 
Back
Top