[C#] problem avec repeater control
Bonjour à tous,
Avec le 'Repeater Control', je prends les donnes dans la base à afficher :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
............
<ItemTemplate>
<tr bgcolor="#999999">
<td>
<%# DataBinder.Eval(Container.DataItem, "PROBLEMID") %>
</td>
<td>
<%# DataBinder.Eval(Container.DataItem, "PROBLEM") %>
</td>
<td>
<asp:ImageButton imageUrl="imagesInterface/edit.gif" CommandName="editProblem" runat="server" ID="Imagebutton1" NAME="Imagebutton1"/>
</td>
<td>
<asp:ImageButton imageUrl="imagesInterface/edit.gif" CommandName="deleteProblem" runat="server" ID="Imagebutton2" NAME="Imagebutton2"/>
</td>
</tr>
</ItemTemplate> ..... |
Lors que je click sur le button image, je prendre le 'PROBLEMID' , mais je ne sais pas comment faire pour accéder à ces ligne.
Je peux pendre le numero de la ligne correpondant avec ce code :
Code:
1 2 3 4 5 6 7 8
| private void repeater_ItemCommand(object source, System.Web.UI.WebControls.RepeaterCommandEventArgs e)
{
if (e.CommandName == "deleteProblem")
{
int rowIndex = e.Item.ItemIndex;
} |
Le problem est : je veux accéder aux éléments de chaque ligne.....
Merci beaucoup de vos aide !
Moniphal