DataView dataView = dtTemp.DefaultView; DataTable dataTableDistinct = dataView.ToTable(true, "UserName","Grade");