<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
EmptyDataText="There are no data records to display." AllowPaging="True" AllowSorting="True"
CellPadding="4" ForeColor="#333333" GridLines="None" Style="margin-right: 0px"
Width="422px" DataKeyNames="EformID,EformType,TaskID">
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<Columns>
<asp:BoundField DataField="A" HeaderText="Talebi Yapan" SortExpression="A">
<ItemStyle Font-Bold="True" ForeColor="Red" HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="B" HeaderText="Talep Zamanı" SortExpression="B"
ReadOnly="True">
<ItemStyle Font-Bold="True" HorizontalAlign="Center" />
</asp:BoundField>
</Columns>
<asp:ButtonField CommandName="Select" Text="Select" />
Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
If e.CommandName = "Select" Then
Dim index As Integer = Convert.ToInt32(e.CommandArgument)
Dim row As GridViewRow = GridView1.Rows(index)
Dim TalebiYapan As String = row.Cells(0).Text
Dim TalepZamanı As String = row.Cells(1).Text
End If
End Sub
<asp:TemplateField HeaderText="Talebi Yapan" Visible="false">
<ItemTemplate>
<asp:Label runat="server" ID="TalebiYapan" Text='<%# Eval("DBField") %>' />
</ItemTemplate>
</asp:TemplateField>