Showing posts with label DataAdapter. Show all posts
Showing posts with label DataAdapter. Show all posts

How to update DataGridView into Databae c#.net

DataGridView:
  DataGridView control is the most important and high features and little tipycal control in C#.Net.The DataGridView control will be like a ecell datasheet. So if u want to use this control you have to maintain all the cells in the datasheet. Here the control having Rows and Columns. These rows and columns must maintain carefully.
            To update the DataGridView control with the DataAdapter is an easy thing. To do that you have to maintain some little steps here. Those this must be maintain some steps while writing the code, then only you will update the datagridview successfully to the database.

Populating DataGridView from database c#

Datagridview control:

DataGridView displays data from SQL databases. Here my code will show how to display a specific table from a database and display it on a DataGridView. For implementing this method we have to use one dataAdapter, which will save the data from the database and this data will fill up to the dataTable or dataSet.If we take the dataSet to fill the table from database the we have to bind the ds.Tables[int Index] to the datagridview datasource. To do that In Visual Studio, select the File menu and then New Project, and select a Windows Forms application. Next, in the designer, drag the DataGridView icon into the