DataTable dtParameter = (DataTable)((ListBox)chkParameter).DataSource;
var distinctNames = (from row in dtGridSeries.AsEnumerable()
select row.Field<string>("Parameter Type")).Distinct();
List<string> lstSelectedParamList = distinctNames.ToList();
or
//----------Get Distinct Record only
// DataTable dtUnique = dtGridSeries.DefaultView.ToTable(true, "Parameter Type");
var distinctNames = (from row in dtGridSeries.AsEnumerable()
select row.Field<string>("Parameter Type")).Distinct();
List<string> lstSelectedParamList = distinctNames.ToList();
or
//----------Get Distinct Record only
// DataTable dtUnique = dtGridSeries.DefaultView.ToTable(true, "Parameter Type");
No comments:
Post a Comment