|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Filter DatasetCorrect me if I'm wrong, but once I have my data returned from a stored
procedure, in a dataset and displayed in a DataGrid (ASP.Net)...I can filter the data correct, without making a return trip to the server? Anyone have an example of how this works? Thanks Steve,
Use a table("x").defaultview.rowfilter = "mycolumn = 'Steve'" for that I hope this helps, Cor Thank you, I'll give that a shot. I'm assuming I can do 'like' expressions
also, not just 'equals'. Show quote "Cor Ligthert" <notmyfirstn***@planet.nl> wrote in message news:uT3w%23vtNFHA.2356@TK2MSFTNGP14.phx.gbl... > Steve, > > Use a table("x").defaultview.rowfilter = "mycolumn = 'Steve'" for that > > I hope this helps, > > Cor > > The documentation for the DataColumn.Expression property provides details of
the syntax you can use for the DataView.RowFilter property. Show quote "Steve Schroeder" <sschroe***@merchant-gould.com> wrote in message news:OE%23jrztNFHA.3760@TK2MSFTNGP12.phx.gbl... > Thank you, I'll give that a shot. I'm assuming I can do 'like' expressions > also, not just 'equals'. > > "Cor Ligthert" <notmyfirstn***@planet.nl> wrote in message > news:uT3w%23vtNFHA.2356@TK2MSFTNGP14.phx.gbl... >> Steve, >> >> Use a table("x").defaultview.rowfilter = "mycolumn = 'Steve'" for that >> >> I hope this helps, >> >> Cor >> >> > > You are right.
Suppose you get data using sp(Select * from Employee ...) to fill a dataset. Then you use following code DataView dv = ds.Tables[0].DefaultView; dv.RowFilter = "Department = 'HR'"; datagrid.DataSource = dv; // only data in HR datagrid.DataBind(); HTH Elton Wang elton_w***@hotmail.com >-----Original Message----- from a stored>Correct me if I'm wrong, but once I have my data returned >procedure, in a dataset and displayed in a DataGrid (ASP.Net)...I can filterShow quote >the data correct, without making a return trip to the server? > >Anyone have an example of how this works? > >Thanks > > >. > |
|||||||||||||||||||||||