Jump to content
  • Revista PROGRAMAR: Já está disponível a edição #60 da revista programar. Faz já o download aqui!

celinho

Eliminar os dados todos da data grid viewer [resolvido]

Recommended Posts

celinho

boas.

Queria eliminar os dados todos da minha data grid viewer,

exemplo tenho um botão clicava la e os dados que eu tinha na data grid viewer eram todos eliminados,

alguem me ajuda?

Share this post


Link to post
Share on other sites
ribeiro55

Rows.Clear não vai funcionar se a datagridview estiver a ser alimentada via DataSource.

Nesses casos basta dares "Nothing" ao DataSource:

DataGridView1.DataSource=Nothing


Sérgio Ribeiro


"Great coders aren't born. They're compiled and released"
"Expert coders do not need a keyboard. They just throw magnets at the RAM chips"

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.