private void f_Load_DG() { string aschemaname = "", atablename = ""; try { if (treeView1.SelectedNode.Parent == null) { aschemaname = treeView1.SelectedNode.Tag.ToString().Trim(); atablename = ""; } else { aschemaname = treeView1.SelectedNode.Parent.Tag.ToString(); atablename = treeView1.SelectedNode.Tag.ToString(); } } catch { } try { DataSet ads = m_v.f_get_sys_table_structure(aschemaname, atablename); dataGridView1.Columns.Clear(); dataGridView1.DataSource = ads.Tables[0]; dataGridView1.Columns[dataGridView1.Columns.Count - 1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; toolStrip_DGTitle.Text = ads.Tables[0].Rows.Count.ToString(); } catch { toolStrip_DGTitle.Text = ""; } }