[GridView][datafield] récuperer un visible=false
'morning all,
savez vous comment on recupere un datafield qui est en visible =false?
idée: comment mettre et recuperer plusieurs datakeynames?
avant je recuperais mes valeurs par des GridView1.SelectedRow.Cells(5).Text et GridView1.SelectedDataKey.Value, mais la j'ai un depassement d'index sur les cellules
thx
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource10" CellPadding="4" ForeColor="#333333" GridLines="None" emptydatatext="No data available." autogenerateeditbutton="True" DataKeyNames="id" ShowFooter="True" AutoGenerateColumns="False" >
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<Columns>
<asp:CommandField ShowSelectButton="True" visible=false/>
<asp:BoundField DataField="id" HeaderText="ID Incident"visible=false />
<asp:BoundField DataField="head" HeaderText="Headline" visible=false/>
</Columns>
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<EditRowStyle BackColor="#999999" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
</asp:GridView> |