Bonjour,

J'ai un datagrid avec 3 colonnes.
1 colonne checkbox
1 colonne pour un code Identifiant
1 colonne pour un libellé

Les colonnes libellés sont remplis en bindant les informations d'une bdd. Jusque la aucun soucis.

J'ai un bouton Valider. Ce que j'aimerais, c'est récupéré les identifiants qui sont checkés afin de pouvoir changer leur statut.

Comment faire?

Ex :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 
<asp:datagrid id="dgListe" Width="100%" Runat="server" AutoGenerateColumns="False" AllowSorting="True"
		AllowPaging="True" PageSize="15">
		<Columns>
			<asp:TemplateColumn>
				<ItemTemplate>
					<asp:CheckBox ID="chkID" Runat="server"></asp:CheckBox>
				</ItemTemplate>
			</asp:TemplateColumn>
			<asp:TemplateColumn HeaderText="Code Id" SortExpression="Code_Id">
				<ItemTemplate>
					<asp:Label ID="Code_ID" Width="100%">
						<%# DataBinder.Eval(Container.DataItem, "Code_ID")%>
					</asp:Label>
				</ItemTemplate>
			</asp:TemplateColumn>
			<asp:BoundColumn DataField="Libelle" SortExpression="Libelle" HeaderText="Libelle">
 
			</asp:BoundColumn>
 
		</Columns>
	</asp:datagrid>