Pricing/Purchase Info
Learn ASP Express
Tech Support
Bug Report

Peace - Now and Forever
ASP Express
The Ultimate ASP Editor
How to Create an Edit/Update/Delete DataGrid
Remember, you must have a primary key defined in your table (on the identity/autonumber field) for this to work well, without manually needing to change the code....
  1. Click DataGrid Assistant - -
  2. Click the 'DataColumns' check box
  3. Choose the Database (it should then take you to the Columns tab)
  4. Under Button Columns, choose Edit/Update/Cancel and click the '>' button to put it on in the right side listbox
  5. Choose all your database columns you want - including a primarykey/autonumber column (you can manually make this column invisible, if you'd like) and click the '>' button again, to add them to the right hand listbox.
  6. If you want a Delete Column - - choose Delete from the left side also
  7. Create a Sub called BindData - -
  8. Then, in your page_load - call BindData (with no arguments)
  9. Next, put your cursor inside the BindData sub so you can create the display for the items in the DataGrid.
    This part can be done either of two ways - -
    1. (if you have the connection to this database already defined in the Data Server window, you can right click on it the table name, choose Create Functions/Select SQL/Binding Code only) or
    2. b. Create your binding code through the pull-down menu (ASP.Net/Data/DataSet or DataReader) - - keep in mind if you're going to do reuse the data, you should probably use DataSet, creating a Select statement for selecting and displaying data.
  10. This creates the binding code in the BindData Subdirectory. Always use the same columns as you did in the DataGrid Assistant.

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