1
Hello, I have a registration screen and save everything ok according to the data filled, but when I click the change button returns all values entries, but does not return radio button selected as it was registered at the time of inclusion.
That is, when I click the change button and should return radio button selected c#.
How do I do?
if (CodTaxa > 0)
{
objTaxa = TaxaBo.getByID(CodTaxa);
objTaxa.DESCRICAO = txtEditDescricao.Text;
objTaxa.TIPOVALOR = tipoValor.ToString(); //valor atribuido pelo radio button
objTaxa.REC_DESP = operacao;//valor atribuido pelo radio button
objTaxa.VLRPADRAO = Convert.ToDecimal(txtEditValorPadrao.Text);
if(ValidaCampos())
{
TaxaBo.Alterar(objTaxa);
}
else
{
MessageBox.Show("Algum campo precisa ser preenchido", "Atenção", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
}
Put the code of how you load the data on the screen because without the code is hard to know, it might be some component Binding error.
– Julio Borges
Other than Binding, you may not be assigning value to the Checked property.
– Ismael
already there!!!! There is some property or method to put as attribution in REC_DESP?
– Danillo Victtor
Where is the part of the code that you fill the components with the object information?
– Jéf Bueno
In order for your radio button to be marked as you said, the Checked property has to be set (receiving value: True or False in binary would be 0 or 1). In this code posted it is not clear where you are performing this operation.
– Diego Farias