Friday, February 10, 2012

DataView in asp.net

DepartmentsSectionsParameterBuilder pm1 = new DepartmentsSectionsParameterBuilder();
pm1.AppendEquals(
DepartmentsColumn.AssetId, assetId.ToString());     
TList<DepartmentsSections> objDeptList = DataRepository.DepartmentsSectionsProvider.Find(pm1.GetParameters());
DataSet dsNode = new DataSet();
if (dsNode != null && dsNode.Tables[0].Count > 0 )
{
      dsNode = objDeptList.ToDataSet(true); //--Convert from List to dataset
      DataView dv = dsNode.Tables["Departments"].DefaultView;
dv.RowFilter = "SectionName='Section1'";
}


No comments:

Post a Comment

Comments

Search

Custom Search
Protected by Copyscape Plagiarism Software