Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataGridView
Message
From
07/11/2007 11:03:20
 
 
To
06/11/2007 20:54:00
General information
Forum:
ASP.NET
Category:
Forms
Title:
Environment versions
Environment:
C# 2.0
OS:
Vista
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01267049
Message ID:
01267298
Views:
12
It did worked out. Here is the code :

Is this a good way to assign values to the controls?. Should I do databinding?.

As you can see below I assign values to textboxes.
How do you assign values to checkbox ( the data is bit type)?
public partial class Producer : Form
    {
        DataRow m_Row;
        public Producer(DataRow row)
        {
            m_Row = row;
         
            InitializeComponent();
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void Producer_Load(object sender, EventArgs e)
        {
            txtFirstName.Text = m_Row["FirstName"].ToString();
            txtLastName.Text = m_Row["LastName"].ToString();
            txtLicenseNumber.Text = m_Row["LicenseNumber"].ToString();
            txtAppointmentDate.Text = m_Row["AppointmentDate"].ToString();

            // How do I assign the value to a checkbox???????
            chkActive ......????            
        }
                
    }
Thanks
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform