ASP Express
The Ultimate ASP Editor

How To Populate a DataGrid in ASP.Net
1 Run the DataGrid Assistant - either from the ASP.Net menu or from the Tags section of the Express Toolbox. You can choose Font, (including formatting - Bold/Italics/Size), Cellpadding/spacing, Background, Foreground & Border colors for each of the Header, Body & Alternating Items
2 Choose either to Sort or Not to Sort


If you choose Not to Sort:
3 Put your cursor between the Head Tags (for coding in the same document) - use Insert Script Item, then the Page_Load item for the language you prefer (VB or C#)
4 To Create a Dataset and bind it to the DataGrid - and choose either the OleDb Adapter or SQL Adapter from the ASP.Net/Data/Dataset menu.
5 This pulls up the SQL Statement Builder Assistant - Choose your Database, Table & SQL statement using the SQL Builder Assistant
6 Your DataGrid Name should pop up in the Select Server Control box - if not - enter the DataGrid name - then - you're finished


If you choose To Sort:
3 Your starting point for coding is where you see the text " ' put your databinding Code here". Either delete the commented line, or, at the end of the line, press return and start coding.
4 To Create a Dataset and bind it to the DataGrid - and choose either the OleDb Adapter or SQL Adapter from the ASP.Net/Data/Dataset menu.
5 This pulls up the SQL Statement Builder Assistant - Choose your Database, Table & SQL statement using the SQL Builder Assistant
6 Your DataGrid Name should pop up in the Select Server Control box - if not - enter the DataGrid name - then - you're finished
Untitled


Back to How To Page | ASP Express Home

Send your comments, questions or suggestions via E-Mail to : (suggestions@aspexpress.com)