1
Hello I know the question is very simple, but I’m having a difficulty, I have a radio button and I would like his text to be received from an SQL Server database through a SELECT. I’m using the Entity Framework. Please leave examples.
1
Hello I know the question is very simple, but I’m having a difficulty, I have a radio button and I would like his text to be received from an SQL Server database through a SELECT. I’m using the Entity Framework. Please leave examples.
0
You can use the Checked property to set the value of your radiobutton, but you need to know what kind of data is coming from your bank.
The Checked property expects a boolean as value, so if you are storing a string(varchar) in your database, you can convert the string as follows.
radioButton1.Checked = Convert.ToBoolean(dt.Rows["PerguntaUM"]);
as long as its value is already Yes or False.
In the case of text you just need to use the property Text
.
radioButton1.Text = dt.Rows["PerguntaUM"].ToString();
Browser other questions tagged c# entity-framework winforms
You are not signed in. Login or sign up in order to post.
How his text is saved in the bank?
– Leonel Sanches da Silva
Cara is a quiz that I am developing, I have a field in the bank with the name of "Questionaum" and I would like the text of this radiobuton to be filled by this field
– Julianno
Radio’s value would not be the answer?
– Leonel Sanches da Silva