Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataGrid with Edit and Delete

Status
Not open for further replies.

multiplex77

Programmer
Dec 25, 2001
302
SG
Hi,

I'm an ASP programmer, now learning the ropes with .NET. I'm trying to create a DataGrid with an "Edit" button and a "Delete" checkbox at the end of each row, like this:

<tr>
<TD>record1_col1</TD>
<TD>record1_col2</TD>
<TD><a href=&quot;edit.asp?id=1&quot;><img src=&quot;images/edit.jpg&quot;></a>
</TD>
<TD><input type=checkbox name=chkDelete value=&quot;1&quot;></TD>
</TR>

My intention for Edit is to edit the record in another webform.

My intention of Delete is to be able to check the checkboxes of the records I want to delete, and click a &quot;Delete&quot; button at the bottom of the form.

1. Does DataGrid provide such form of customization? Also, how can I make the Edit and Delete appear on the RIGHTmost column of the row. The DataGrid default is to have it appear on the left column.

2. Also, how can I place the ID of the record (fr the database) appear within the form objects of the row,
e.g.,
<input type=checkbox value=&quot;<%= objRS(&quot;ID&quot;) %>&quot; name=chkDelete>

Thanks very much for the help.


 
Take a look at the DataGrid samples in your .Net Framework QuickStarts. DataGrid1 through DataGrid18 samples demonstrate how to use different methods & properties of DataGrid control, including the ones you need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top