Загрузка страницы

Multi Column Combo box in C Sharp

public object DataSource { get; set; }
private BindingSource bindingSource1 = new BindingSource();

private static DataTable GetData(string sqlCommand)
{
string connectionString = @"Data Source=.\SQLEXPRESS;Initial Catalog=school;Persist Security Info=True;";

SqlConnection northwindConnection = new SqlConnection(connectionString);

SqlCommand command = new SqlCommand(sqlCommand, northwindConnection);
SqlDataAdapter adapter = new SqlDataAdapter();
adapter.SelectCommand = command;

DataTable table = new DataTable();
table.Locale = System.Globalization.CultureInfo.InvariantCulture;
adapter.Fill(table);

return table;
}
private void frm_book_Load(object sender, EventArgs e)
{
bindingSource1.DataSource = GetData("select id,code from subject");
comboTree1.DataSource = bindingSource1;
}

Видео Multi Column Combo box in C Sharp канала bitica soft
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
21 февраля 2021 г. 16:11:44
00:12:59
Яндекс.Метрика