K
Kimkhoa.Tran
HI everyone, i'm so stress out because something so simple but i can't
figure out how to do it.
I have a dataset name ds (typed dataset), side that ds contains a table
name Employee.
ds.Tables["Emploee"].Columns["City_Fk"]
ex.say this table contains 50 records, and 10 records has City_Fk = 4
Say i want to make a view only for a certain city, now all the city.
So i have something like this (this is all type in, might be typo
error)
DataView dv = new DataView();
dv.Table = ds.Employee.DefaultView;
dv.RowFilter = "City_Fk = 4";
i got the dv.Count = 10 alright, but how come dv.Table.Rows.Count
still = 50, why doensn't the table filter out also. (but that's one of
my confusion)
ok so now i have the dv contains 10 records like i wanted, but how do i
put this 10 record in the ds.Emploee now?, i don't want the ds.Employee
holding 50 records, i only want it to hold what ever the returns
records from the dataview.
I have done lots of research but could'nt get any answer
please
help!
i even tried
ds.Employee.DefaultView.RowFilter = ""City_Fk = 4"; but the
ds.Employee.Rows.Count still = 50. Didn't understand what this
rowfilter suppose to do, it seems like it didn't filter anything for
me.
Any help or suggestion is greatly appreciated. i'm in a tight deadline

thanks in advance.
Kim
figure out how to do it.
I have a dataset name ds (typed dataset), side that ds contains a table
name Employee.
ds.Tables["Emploee"].Columns["City_Fk"]
ex.say this table contains 50 records, and 10 records has City_Fk = 4
Say i want to make a view only for a certain city, now all the city.
So i have something like this (this is all type in, might be typo
error)
DataView dv = new DataView();
dv.Table = ds.Employee.DefaultView;
dv.RowFilter = "City_Fk = 4";
i got the dv.Count = 10 alright, but how come dv.Table.Rows.Count
still = 50, why doensn't the table filter out also. (but that's one of
my confusion)
ok so now i have the dv contains 10 records like i wanted, but how do i
put this 10 record in the ds.Emploee now?, i don't want the ds.Employee
holding 50 records, i only want it to hold what ever the returns
records from the dataview.
I have done lots of research but could'nt get any answer

help!
i even tried
ds.Employee.DefaultView.RowFilter = ""City_Fk = 4"; but the
ds.Employee.Rows.Count still = 50. Didn't understand what this
rowfilter suppose to do, it seems like it didn't filter anything for
me.
Any help or suggestion is greatly appreciated. i'm in a tight deadline

thanks in advance.
Kim