Crown Clit

Crown Clit

  • 2k
  • 14
  • 6.6k

asp.net c# LinkButton in gridview displayed as text only

Oct 28 2014 12:27 AM
Hi there.
 
I am the beginner currently creating a family site and having the problem displaying a LinkButton as a LinkButton on my member search page. After user selects search criteria and clicks submit button gridview should displays list of members and their IDs in a template column with a LinkButton. However after the results got returned you can not click on the column. text is not blue and underlined. Same grid view code works perfectly on a different page.
I am searching for the solutions for a quite while now but I can not solve that issue.
Could somebody please helps me out? It drives me nuts.
 
CC
 
code:
<asp:GridView  ID="gridVw1" runat="server" BorderColor="#666666" BorderWidth="1px" Font-Names="Calibri" meta:resourcekey="gridVw1Resource1" AutoGenerateColumns="False" AllowCustomPaging="True">
                    <Columns>
                        <asp:TemplateField HeaderText="FamilyMemberID">
                            <ItemTemplate>
                                <asp:LinkButton ID="lnkFamilyMemberID" runat="server" Text='<%#Eval("FamilyMemberID") %>' OnClick="lnkFamilyMemberID_Click" ></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="Branch" DataField="Branch" meta:resourcekey="BoundFieldResource1"/>
                        <asp:BoundField HeaderText="Generation" DataField="Generation" meta:resourcekey="BoundFieldResource2"/>
                        <asp:BoundField HeaderText="MemberName" DataField="MemberName" meta:resourcekey="BoundFieldResource3"/>
                        <asp:BoundField HeaderText="Dates" DataField="Dates" meta:resourcekey="BoundFieldResource4"/>
                        <asp:BoundField HeaderText="Sex" DataField="Sex" meta:resourcekey="BoundFieldResource5"/>
                        <asp:BoundField HeaderText="FatherID" DataField="FatherID" meta:resourcekey="BoundFieldResource6"/>
                        <asp:BoundField HeaderText="SpouseID" DataField="SpouseID" meta:resourcekey="BoundFieldResource7"/>
                        <asp:BoundField HeaderText="MotherID" DataField="MotherID" meta:resourcekey="BoundFieldResource8"/>
                        <asp:BoundField HeaderText="Children" DataField="Children" meta:resourcekey="BoundFieldResource9"/>
                    </Columns>
</asp:GridView> 


Answers (3)