我的要求如下,我打電話給一個程序,我正在填充一個DataTable
。假定程序返回emp_id
,emp_name
,指定和狀態。當我使用DataGridView1.DataSource = <Name of the DataTable>
時,我得到填充到DataGridView中的所有列。如何只顯示DataGridView
中的選定列。例如,我只想顯示emp_id
和emp_name
。DataGridView和DataBinding與自定義列
同樣,你可以請我幫助我如何通過編寫代碼來增加DataGridView的列的寬度。
非常感謝鮑比。現在工作正常。感謝您的快速響應和幫助。再次感謝。 – 2010-09-09 11:40:47