Exemplo n.º 1
0
        public void loaddata(string search)
        {
            dbconnect db = new dbconnect();

            db.data_adapter(search, db.con);
            DataSet ds = new DataSet();

            db.da.Fill(ds);
            dataGridView1.DataSource = ds.Tables[0];
            db.dbclose();
            foreach (DataGridViewColumn column in dataGridView1.Columns)
            {
                column.SortMode = DataGridViewColumnSortMode.NotSortable;
            }
        }