| Author: Pascal 10 Jan 2009 | Member Level: Gold | Rating: Points: 2 |
I think we can loop thru the rows in the existing datatable with some rows in it to check if the category already exists before adding the new row to the existing datatable. If exists then dont add the row to the datatable. Else add it and refresh the datagrid.
|
| Author: syed shakeer hussain 10 Jan 2009 | Member Level: Diamond | Rating: Points: 2 |
Hi.. U can use Distinct Keyword in sql Query
SqlDataAdapter adapter=new SqlDataAdapter("SELECT DISTINCT column_name FROM table_name",conn); . . . . DataGrid1.DataSource=ds.Tables["tablename"];
You will not get repeated values in datagrid
|