I am creating a windows application in c#,
I have 1 Datagridview and after I set it\'s DataSource it should have 3 Rows.
I have attached 2 Event Habdlers to
I believe it depends on your other methods, where you're actually setting the DataSource. It seems to me like you're either setting the DataSource twice or calling DataBind twice, and on each DataBind you're actually getting two rows into the DataGridView, thus the 4 total.
Some additional code might help...
Some things to try: search for DataBind(), DataSource(), etc in your code and make sure it's only being called in the appropriate places.
Additionally, it's not necessarily bad for the DataBind to be called twice, assuming something changes between the databinds... some change of state... really hard to say without background.