C# Tutorial - How to Load selected columns data in DataGridView | FoxLearn

preview_player
Показать описание
How to load selected columns data in DataGridView using C#

C#-How to load selected columns data in datagridview
How to Bind specific Columns of a datatable to a datagridView?
c# - How to show only certain columns in a DataGridView with custom objects
c# - How do I display only certain columns from a data table?
Show (bind) only some specific (certain) columns of DataGridView control in Windows Forms (WinForms) Application using C#
How To Get Specify Column Data From Datagridview?
Рекомендации по теме
Комментарии
Автор

if table 1500 columns

SqlConnection cn = new SqlConnection();
SqlCommand cmd = new SqlCommand();
SqlDataReader dr;


public NastrGrid()
{
InitializeComponent();
}

private void loaddata ()
{
cmd.CommandText = "Select column_name FROM information_schema.columns WHERE table_name= 'You table' ORDER BY ordinal_position";
cn.Open();
dr = cmd.ExecuteReader();
if (dr.HasRows)
{

while (dr.Read())
{

}
dr.Close();
cn.Close();
}
}

vasyafoonken
Автор

te rog pentru a simplifica lucrurile, ... poti face acest lucru cu o baza de date din Acces?
Multumesc anticipat!

raduluchian
Автор

if i use this method to show selected rows... what modification would i do ?

mutahhirkhan
Автор

can i do the same using MYSQL, ? because i have some errors logging in SQL SERVER..!!

jagadeeshbarfa
visit shbcf.ru