kazzx Posted December 23, 2009 at 04:11 PM Report Share #302055 Posted December 23, 2009 at 04:11 PM em que evento do datagridview tenho de colocar If dgv1.SelectedRows.Count <> 0 Then btnliberta.Enabled = True Else btnliberta.Enabled = False End If para quando seleccionar uma row ele me activar um botão ? Link to comment Share on other sites More sharing options...
ribeiro55 Posted December 23, 2009 at 04:14 PM Report Share #302056 Posted December 23, 2009 at 04:14 PM Tens de meter esse bloco de código num evento como por exemplo, o "SelectionChanged" da DataGridView. Isto fará com que esse bloco de código seja corrido sempre que ocorrerem alterações na selecção da datagridview. (entende "alterações na selecção" como seleccionar e remover ou alterar selecção) 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" Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now