Pages

Thursday, July 7, 2011

Retrieve the Filtered records in the form of datatable from the given system.datatable.

In some cases we require to retrieve the records from system.datatable using some Filter criteria and store back in a new datatable. This can be done by the following code.
For example assume that the datatable dt contains the values as follows.
Now to add filter to the dt we use, dt.Select("Filter condition"); But this would return as array of rows only. But when you want return records as datatable we get the help of DataSet as follows:
Thus we get the resultant records in the form of datatable. :) :)

No comments:

Post a Comment