No I have not applied your code. Reason being is because my design is different from yours and in order for me to use your code I have to change my design. I want to keep my design because I know I am very close to getting it work. I am sure if I switch to your design then it will work.
Anyway, I made a breakthrough by modifying my NavigateUrl a bit below to include ID and CompanyName columns :)
This is my code and it works. I share it hoping it might benefit someone.
<asp:TemplateField HeaderText="Company">
<ItemTemplate>
<asp:HyperLink ID ="ID2" runat="server" Text ="Company"
NavigateUrl='<%# "~/folder1/folder2/CompanyDetails.aspx?ID=" + Eval("ID") + "&CompanyName=" + Server.UrlEncode(Eval("CompanyName").ToString()) %>'>
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
Thanks so much for your help. As always, your design is very professional and I will mark your answer to close this.