Search articles in this blog and in my other related blogs.


Tuesday, June 10, 2008

searching, filtering and sorting in typed dataset using DataTable and custom expressions

Searching :

step 1: create typed dataset
step 2: create datatable
step 3: use the datatable findby() function passing primary key to get a particular row.


Filtering :

step 1: create typed dataset
step 2: create datatable
step 3: use the datatable select() function passing selecting condition to get multiple rows.

Sorting :

step 1: create typed dataset
step 2: create datatable
step 3: use the datatable select() function passing selecting condition to get multiple rows with additional parameter of columnname by which it is to be sorted.

Custom Expression :

step 1: create typed dataset
step 2: create datatable
step 3: add column whose data is some combination of other columns.
step 4: additional function compute() of datatable to appply certain function such as sum, avg...etc

source:http://davidhayden.com/blog/dave/archive/2006/01/01/2661.aspx

0 comments: