nope. it's all runtime. This is an example that I wrote in here but didn't
test but the idea will be there
Me.OleDbDataAdapter1.Fill(DataSet11)
DataSet11.Table(0).DefaultView.RowFilter = "ColumnName = FilterValue"
DataGrid1.DataSource = DataSet11.Table(0).DefaultView
That should work. The RowFilter property is basically a where clause of a
SQL statment. You can create a DataView object instead of using the
defaultview from the datatable if you want.
Me.OleDbDataAdapter1.Fill(DataSet11)
Dim DV as DataView
DV = DataSet11.Table(0).DefaultView
DV.RowFilter = .RowFilter = "ColumnName = FilterValue"
DataGrid1.DataSource = DV
Hope it helps
Chris
"Art" <Ar*@discussions.microsoft.com> wrote in message
news:37**********************************@microsof t.com...
Chris,
I will need to select criteria during run time. That is, I'll pick
something from a ComboBox and I'll want to make my DataGrid show me the
appropriate records. Can a DataView do this? I did read a little on it
and
it sounded like it was something that had to be set up ahead of time.
Thanks for your help.
Art
"Chris, Master of All Things Insignifican" wrote:
Try using a dataview to filter the events. Then bind the dataview to the
datasource. Set the DataView.Rowfilter property to get your subset.
Chris
"Art" <Ar*@discussions.microsoft.com> wrote in message
news:9B**********************************@microsof t.com... > Hi,
>
> Once again, I'm stuck.
>
> I want to view a table using a DataGrid. I'd like to fiter that view
> by
> criteria on various fields.
>
> So far, I've created a DataAdapter, generated a DataSet and used that
> DataSet as the DataSource for a DataGrid. I put a "fill" in my open
> form
> event.
> Me.OleDbDataAdapter1.Fill(DataSet11)
>
> Then I tried a select statement:
> Me.DataSet11.Company.Select("ID=3", "ID",
> DataViewRowState.CurrentRows)
>
> "Company" is the one and only table I selected when configuring the
> DataAdapter.
>
> The entire dataset shows up in my DataGrid. I can't seem to get it to
> filter.
>
> Can anyone help?
>
> Art