eskalha Posted May 5, 2012 at 06:34 PM Report #453323 Posted May 5, 2012 at 06:34 PM Boa tarde, Gostaria de saber se existe algum evento da DataGridView que permita realizar tarefas quando o utilizador selecionar duas ou mais linhas de uma dataGridView Sei que existe o dataGridView1.MultiSelectChanged mas isto é so quando a propriedade MultiSelect da DGV é alterada, e não é isso que pretendo. Alguem me pode arranjar uma maneira de realizar uma acção so quando forem selecionadas duas ou mais linhas de uma DGV?
Guest Posted May 5, 2012 at 10:02 PM Report #453354 Posted May 5, 2012 at 10:02 PM int selectedRowCount = dataGridView.Rows.GetRowCount(DataGridViewElementStates.Selected); if (selectedRowCount > 1) MessageBox.Show(selectedRowCount.ToString());
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