dataGridView控制显示

 dataGridView1.DataSource = bindingSource_log;
                   bindingSource_log.DataMember = "dir_ctrl";
                   //SELECT id, op, [date], [user] FROM dir_ctrl
                   OleDbDataAdapter dir = new OleDbDataAdapter(new OleDbCommand("select * from dir_ctrl", oleDbConn));
                   dir.Fill(data_infoDataSet_log.dir_ctrl);

                   get_datagridview_by_name("id").Visible = false;
                   get_datagridview_by_name("op").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
                    get_datagridview_by_name("op").HeaderText= "操作";
                   get_datagridview_by_name("date").HeaderText = "时间";
                   get_datagridview_by_name("user").HeaderText = "用户";

posted @ 2007-02-24 22:30  ahuo  阅读(329)  评论(0编辑  收藏  举报