private void Form1_Load(object sender, EventArgs e)
{
dt = new DataTable();
dt.Columns.Add("role_id", typeof(int));
dt.Columns.Add("role_name", typeof(string));
dt.Columns.Add("role_descr", typeof(string));
dt.Rows.Add( new object[] { 1, "Admin", "" } );
dt.Rows.Add( new object[] { 2, "App User", "" } );
dt.Rows.Add( new object[] { 3, "Power User", "" } );
dt.Rows.Add( new object[] { 4, "Maintanence", "" } );
dt.Rows.Add( new object[] { 5, "Supervior", "" } );
dt.Rows.Add( new object[] { 6, "Tester", "" } );
checkedListBox1.DataSource = dt;
checkedListBox1.DisplayMember = "role_name";
checkedListBox1.ValueMember = "role_id"; ;
}
|