0

I have datagridview that is bounded with some data source....
I want that the Datagridview should keep all the rows with their data when i remove its Datasource...
I remove its datasource by

Mydatagridview.datasource = Nothing....

When i do that... the datagridview clear all rows...

Please tell me how to do that...

3
Contributors
8
Replies
19
Views
4 Years
Discussion Span
Last Post by ashley.steenson
0

i don't know with others people here, but i think it can't do like that because its directly connect to the database. anyway, why you have to remove your datasource?

Edited by artemix22

0

Thanks Artemix22 for response...
Here is reason why i want to do so....

My datagridview get data from database on a button click throug a binding source...
But i want to add new rows in this bounded datagridview...
Thats why i want to unbound the datagridview as i cannot add new row in bounded datagrid view...
But as i unbound this datagridview..... all rows are gone...
Suggest me any solution...

0

i know one way to add more rows to bound datagridview through DataTable, the problem is, you have to use datatable to bind, want some example?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.