Database records filtering

J

Jeebu

hi,
u can use the dataview filter property for filtering.
suppose ds is the name of the dataset.
create a view
dataview dv;
dv=ds.tables[0].defaultView;
dv.RowFilter="Name='joan'";
if u want to sort
dv.sort="Name ASC";

grid.datasource=dv;
grid.databind()

cheers
jeebu
 
B

Brock Allen

You can either build a where clause into your SQL or you use the DataView
(by setting the RowFilter property) on a DataTable when loading data into
a DataSet. Otherwise you're on your own if you use some other data storage
mechanism.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top