Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

How to update DataGridView Columns when using a binding source.

$
0
0

Hi,

On my application I use DataGridView tool to display some data from a database in MS SQL Server. The data source are binded from the MS SQL database to Visual Studio project, then i use a datagrid to bind data from one table. When I insert/delete a column on the database table, then I reconfigure the datasource in the VS project to get new changes (updated DataTable) , but the problem is that those changes do not affect datagridview columns, which leads to many runtime errors ( those errors tell that there is in the search query), so I have to edit datagridview properties manually in order to get new edited table columns. Is there any better way to make datagridview columns update automatically depending on project DataTable ( or even better on database columns) ? I am not sure if using Entity Framework gonna help or not.

Thanks in advance



Admir


Viewing all articles
Browse latest Browse all 2535

Trending Articles