Updating WinForm DataGrid Control in .Net 2003

I am using VS 2005 and VS 2008 and never asked this question, but now I find it difficult to use the controls in VS 2003. The DataGridView does not exist and I am forced to use the DataGrid control to display some data. The problem is that I want to edit some of the values ​​displayed by this control and reflect those changes in the database, and I can't find a way to achieve this. Already "googled", no relevant results found, so please give me a little help. I am coding in C #.

+1


a source to share


4 answers


There is a reason it DataGrid

was replaced with DataGridView

... I expect you will need to find a third party grid control for 1.1 to do this (but this gets trickier the older 1.1 gets).



Sorry if this is not very helpful ...

0


a source


you can use SqlDataAdapter to populate your DataSet and bind this DataSet to DataGrid and after making changes to DataGrid just call SqlDataAdapter.Update method to update database



0


a source


You can use listview to display data from database. You can bind the items listview source to the list you get from the DB. You can also make the listview editable.

If the list is not enough, you can use WindowsFormHost like

 System.Windows.Forms.FlowLayoutPanel advancedFlowLayoutPanel =
                                                this.flowLayoutHost.Child as System.Windows.Forms.FlowLayoutPanel;
            advancedFlowLayoutPanel.WrapContents = true;

      

Inside it, you can put a DataGrid.

0


a source


I got a link from google as a new user I can't post when you google with the words DataGrid Windows msdn, the first result has an example, make sure you change the msnd version to 1.1 framework.

Hope it helps.

0


a source







All Articles