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
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
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
Multi Column Combobox C# | SQLFilter DatagridView Rows with TextBox value in C#Combo Tree Box in DotNetBar | C# | Bitica SoftCustom ComboBox - Icon, Back, Text & Border Color - WinForms C#How to use Tab Controls in C# | tab control c# | Tabs in c# | Tabcontrol with tab pages | C# TabsCRUD con Tablas Relacionadas Parte 1, Insertar, Mostrar Datos, C#, SQL, Capas (ComboBox, Inner Join)C# Full project(Gym Management System)with Source CodeCascading ComboBox or DropDownlist in Windows Application using C# .NETPart 2 - Auto Increment Number In Textbox Using C#C# Getting ComboBox Name/Value using a DataSourceGet a image from data grid view to picture box in c sharpDatabase values in textbox if select Combobox C#Mdi Parent and Child Form in C# win form application setp by stepC# Tutorial - How to Display a value from a ComboBox in a TextBox | FoxLearnC# - How to Upload File to FolderThe Combo box as a Search option in C# windows form applicationC# Tutorial 88: How to Search Listbox and get all matches using C#C# Save C# Picturebox Image Into Sql ServerC# Tutorial 12: How to Link List Box with Database and show values in textbox if select ListBoxC# Tutorial 48 - Checkbox