Reputation: 333
I have Clients
table with Client_Name
, Client_Address
and Client_Phone
columns.
And I have a form Client Manager
to EDIT/DELETE the clients.
How can I display the Clients table in the form and enable user to manage (EDIT/DELETE) it ?
I know one way to do this is DataGridView But it doesn't fulfill my needs.
I want something like this :
I have done this before in php/mysql , like this :
<table>
<tr><td>Client Name</td><td>Client Address</td><td>Client Phone</td><td> EDIT </td><td> DELETE</td></tr>
<?php
foreach ($clients->result_array() as $key)
{
echo "<tr>";
echo "<td>".$key['Client_Name']."</td>";
echo "<td>".$key['Client_Address']."</td>";
echo "<td>".$key['Client_Phone']."</td>";
echo "<td><a href='edit.php?id=".$key['id']."'>Edit</a></td>";
echo "<td><a href='delete.php?id".$key['id']."'>Delete</a></td>";
echo "</tr>";
}
How to do something like this in c# ?
Upvotes: 1
Views: 116
Reputation: 125197
In windows Forms you can use:
Editable
Using Toolstrip for add, delete and save operations. Edit will be done in grid.
Non-Editable
Using Toolstrip for add, delete and edit operations. add and edit usually will be done in separate form, delete will be done using after a MessageBox for confirm delete.
Screen shot of Add Form, Edit Form is like Add Form and show entity data in controls:
Upvotes: 1