Jump to content

Alterar dados datagridview


Recommended Posts

Para saberes a linha que está selecionada (o indice):


Para fazeres a atualização:

query = "update from tuatabela set CampoQueQueresAlterar = '" & dg.Item(0, i).Value() & "'  where codigo='1';
//dg.Item(0, i) ; 0 -> indice do campo
			  i -> indice da linha
//o codigo pus 1, adaptas ao indice do campo que tens que alterar
Edited by NunoDinis

Estranha forma de vida que tem a capacidade de transformar comandos em mensagens de erro.


Link to comment
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
  • Create New...

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.