anatase
January 16th, 2003, 09:54 PM
This seems to ignore the filter part, I confirmed with a few samples that
the code below appears right. Please let me know.
I setup my dataset, sql stuff in the private void InitializeComponent() {}
portion using the vs.net wizards. The datagrid should just be showing all
records with the vendor filter below, but all it's showing is whats
specified in the select statement. Does that take precedence? I don't think
I should have to use clear my dataset... do I?
private void Page_Load(object sender, System.EventArgs e)
{
sqlDataAdapter1.Fill(dataSet11);
DataView dv = new DataView(dataSet11.Tables[0]);
dv.RowFilter = "vendor = 'IBM'";
DataGrid1.DataSource = dv;
DataGrid1.DataBind();
}
I'm getting fruster-cated don't mind me, hopefully someone can spot my error. It's just that I think it has to do with the preloaded dataset, but without knowing what it's doing I don't know how to fix this. In the past I cleared the dataset and refilled the dataset with a new select statement, which should be unacceptable.
the code below appears right. Please let me know.
I setup my dataset, sql stuff in the private void InitializeComponent() {}
portion using the vs.net wizards. The datagrid should just be showing all
records with the vendor filter below, but all it's showing is whats
specified in the select statement. Does that take precedence? I don't think
I should have to use clear my dataset... do I?
private void Page_Load(object sender, System.EventArgs e)
{
sqlDataAdapter1.Fill(dataSet11);
DataView dv = new DataView(dataSet11.Tables[0]);
dv.RowFilter = "vendor = 'IBM'";
DataGrid1.DataSource = dv;
DataGrid1.DataBind();
}
I'm getting fruster-cated don't mind me, hopefully someone can spot my error. It's just that I think it has to do with the preloaded dataset, but without knowing what it's doing I don't know how to fix this. In the past I cleared the dataset and refilled the dataset with a new select statement, which should be unacceptable.