|
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 quoteHide 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 quoteHide 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 quoteHide quote >the data correct, without making a return trip to the server? > >Anyone have an example of how this works? > >Thanks > > >. >
Other interesting topics
Memory leak in OleDbCommand.ExecuteNonQuery()?
C# and ADO.Net - Cheap Question! closing connection not by design Architecture: One Producer, Many Consumers SQLConnection connection pool issue No cursor when compared with ADO How does ADO.NET handle transactions when the connection is broken Strange slow down with imbricated DataReader (Oracle, c#) XML Schema (XSD) and ADO.net DataSet - limitations mapping between them Trouble with creating DataRelations - Need Help |
|||||||||||||||||||||||