C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » DataGridView »

Databinding the GRID VIEW using C#


Posted Date: 05 Sep 2008    Resource Type: Code Snippets    Category: DataGridView
Author: MakeshMember Level: Silver    
Rating: 1 out of 5Points: 10



Grid view is used to view the datas stored in the data base in a formatted style . These datas are viewed in a grids .Beginners to understand the concept of datagrid create a database from solution Explorer , add new item , Sql Data base and create tables by right click on solution explorer ( Alt + cntrl + s) and add some data by showdata in tables . create a data set by add new item in solution explorer ( alt + cntrl + l ) add new procedure and select table and save procedure ( fill data and get data ) . Add a grid view control from tools and add the following code in page load ()



DS1TableAdapters.itemTableAdapter s1 = new DS1TableAdapters.item TableAdapter();
GridView1.DataSource = s1.GetDataByType
GridView1.DataBind();




where DS1 is the dataset name and item is the table name


** download the following zip file and try




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Gridview  .  Data binding  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Gridview Sorting and Paging
Previous Resource: Add Grid Row
Return to Discussion Resource Index
Post New Resource
Category: DataGridView


Post resources and earn money!
 
Related Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use