ProgramadoraR Posted March 11, 2013 at 10:30 PM Report #498791 Posted March 11, 2013 at 10:30 PM (edited) Boas, eu criei um evento (CellContentClick) no datagridview para quando uma coluna for igual a 0 aparecer essa linha a vermelho e para isso utilizei o seguinte codigo: private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.Value != null && e.ColumnIndex == 12 && e.Value.Equals("0")) { DataGridViewColumn row = dataGridView1.Columns[e.ColumnIndex]; row.DefaultCellStyle.ForeColor = Color.Red; } } mas está-me a dar um erro no Valuw O que diz no erro é: 'System.Windows.Forms.DataGridViewCellEventArgs' does not contain a definition for 'Valu' and no extension method 'Value' accepting a first argument of type 'System.Windows.Forms.DataGridViewCellEventArgs' could be found (are you missing a using directive or an assembly reference?) sinceramente não percebo porque isto não esta a dar, alguem me pode ajudar? se faz favor.... Desde ja, Obrigada Edited March 12, 2013 at 09:12 AM by Caça GeSHi
Caça Posted March 12, 2013 at 09:14 AM Report #498813 Posted March 12, 2013 at 09:14 AM A função Value não está presente na classe DataGridViewCellEventArgs Pedro Martins Não respondo a duvidas por PM
pikax Posted March 12, 2013 at 09:39 AM Report #498816 Posted March 12, 2013 at 09:39 AM nao existe a Propriedade Value no DataGridViewCellEventArgs Por muito mais que que estude só aprendo uma coisa, que ainda tenho muita coisa para aprender. A beleza de um código está em decompor problemas complexos em pequenos blocos simples. "learn how to do it manually first, then use the wizzy tool to save time." "Kill the baby, don't be afraid of starting all over again. Fail soon, learn fast."
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