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....
Click DataGrid Assistant - -
Click the 'DataColumns' check box
Choose the Database (it should then take you to the Columns tab)
Under Button Columns, choose Edit/Update/Cancel and click the '>' button to put it on in the right side listbox
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.
If you want a Delete Column - - choose Delete from the left side also
Create a Sub called BindData - -
Then, in your page_load - call BindData (with no arguments)
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 - -
(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
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.
This creates the binding code in the BindData Subdirectory. Always use the same columns as you did in the DataGrid Assistant.