S
Sebastian
Hello!
I have bound a DataTable to my GridView. The DataTable has 3 Columns and
I display the Data with TemplateFields in my GridView. I have in the
first Column "LinkButton" - Field and in the other two Columns I have
"Label" - Fields!
How can I retrieve the Data of the third Column, when I click the
"LinkButton" from the same row?
I hope anyone could help me!
Here is the code from my GridView...
<asp:GridView ID="gdvData" runat="server" AutoGenerateColumns=False
CellPadding="6" ForeColor="#333333"
Style="left: 0px; position: relative; top: 25px" >
<Columns>
<asp:TemplateField HeaderText="Name" >
<ItemTemplate>
<asp:LinkButton ID="lkbName" runat="server"
Text='<%#Eval("Name")%>' OnClick="LinkButton_Click"/>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Erstellt am" >
<ItemTemplate>
<asp:Label ID="lblCreationTime" runat="server"
Text='<%#Eval("Erstellt am", "{0:d}")%>'/>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="FullName" >
<ItemTemplate>
<asp:Label ID="lblFullName" runat="server"
Text='<%#Eval("Pfad")%>'/>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
</asp:GridView>
Regards
Sebastian
I have bound a DataTable to my GridView. The DataTable has 3 Columns and
I display the Data with TemplateFields in my GridView. I have in the
first Column "LinkButton" - Field and in the other two Columns I have
"Label" - Fields!
How can I retrieve the Data of the third Column, when I click the
"LinkButton" from the same row?
I hope anyone could help me!
Here is the code from my GridView...
<asp:GridView ID="gdvData" runat="server" AutoGenerateColumns=False
CellPadding="6" ForeColor="#333333"
Style="left: 0px; position: relative; top: 25px" >
<Columns>
<asp:TemplateField HeaderText="Name" >
<ItemTemplate>
<asp:LinkButton ID="lkbName" runat="server"
Text='<%#Eval("Name")%>' OnClick="LinkButton_Click"/>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Erstellt am" >
<ItemTemplate>
<asp:Label ID="lblCreationTime" runat="server"
Text='<%#Eval("Erstellt am", "{0:d}")%>'/>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="FullName" >
<ItemTemplate>
<asp:Label ID="lblFullName" runat="server"
Text='<%#Eval("Pfad")%>'/>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
</asp:GridView>
Regards
Sebastian