i have a datagrid with following code
but app return error when try this line:
why?
i want this code for autoresize DataGrid, so let me know if you have a correct code for autoresizing datagrid.
Code:
this.dataSet11.Clear();
this.oleDbDataAdapter1.Fill(this.dataSet11,"ClientsTable");
this.dataGrid1.DataSource=this.dataSet11.Tables["ClientsTable"].DefaultView;
DataTable dataTable = (DataTable)dataGrid1.DataSource;
Code:
DataTable dataTable = (DataTable)dataGrid1.DataSource;
i want this code for autoresize DataGrid, so let me know if you have a correct code for autoresizing datagrid.