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...

Recommended Answers

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?

Jump to Post

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?

Jump to Post

All 8 Replies

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?

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...

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?

No dear.... because i m not using datatable....

you can add row to it, it's not need to clear the datasource.

Then how to do it... plz tell me...

show us your work first dude.

losers whats the point of answering question u dont know the answer to. WASTE OF TIME

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.