Saturday, December 1, 2007

Selecting or filtering value from DataSet

Suppose we have a District table having fields
District_Key
District_Name
District_StateKey
.....
.....

and have all the values in a dataset

DataSet dsState;

now we want to filter those value whoes state id is 4;
then we we can easily filter those value

DataRow[] dr = dsState.Tables[0].Select("State_Key=4");

No comments: