troubleshooting Question gridview bound template format column in new row

Avatar of worldfear
worldfear asked on
.NET ProgrammingASP.NET
9 Comments1 Solution1538 ViewsLast Modified:
i have a gridview that is bound to a query.  i want the final two fields of the query to be displayed in a single column in a new row.  when the user clicks the hyperlink "expand" in the rightmost column, the final two fields become visible below.  
<asp:GridView ID="GridView1" runat="server" HeaderStyle-BackColor="#CCCCFF" HeaderStyle-Font-Size="XX-Small"
                HeaderStyle-Font-Bold="True" HeaderStyle-BorderStyle="None" BorderStyle="None" AutoGenerateColumns="false">
                    <asp:TemplateField HeaderText="Leg">
                        <ItemTemplate><%# DataBinder.Eval(Container.DataItem,"leg") %></ItemTemplate>
                     <asp:TemplateField HeaderText="Conflict level">
                        <ItemTemplate><%# DataBinder.Eval(Container.DataItem,"clevel") %></ItemTemplate>
                     <asp:TemplateField HeaderText="Next conflict">
                        <ItemTemplate><%# DataBinder.Eval(Container.DataItem,"nextconflict") %></ItemTemplate>
                    <asp:TemplateField HeaderText="Clock">
                        <ItemTemplate><%# DataBinder.Eval(Container.DataItem,"clock") %></ItemTemplate>
                    <asp:TemplateField HeaderText="MOA">
                        <ItemTemplate><%# DataBinder.Eval(Container.DataItem,"moa") %></ItemTemplate>
                    <asp:TemplateField HeaderText="Callsign">
                        <ItemTemplate><%# DataBinder.Eval(Container.DataItem,"callsign") %></ItemTemplate>
                        <asp:TemplateField HeaderText="Aircraft">
                        <ItemTemplate><%# DataBinder.Eval(Container.DataItem,"aircraft") %></ItemTemplate>
                        <asp:TemplateField HeaderText="Routedesignator">
                        <ItemTemplate><%# DataBinder.Eval(Container.DataItem,"routedesignator") %></ItemTemplate>
                        <asp:TemplateField HeaderText="Groundspeed">
                        <ItemTemplate><%# DataBinder.Eval(Container.DataItem,"groundspeed") %></ItemTemplate>
                       <asp:TemplateField HeaderText="Altitude">
                        <ItemTemplate><%# DataBinder.Eval(Container.DataItem,"alt") %></ItemTemplate>
                       <asp:TemplateField HeaderText="Frequency">
                        <ItemTemplate><%# DataBinder.Eval(Container.DataItem,"freq") %></ItemTemplate>
                       <asp:TemplateField HeaderText="View Contacts">
                         <asp:HyperLink  ID="hlUrl"  runat="server"  ?????>expand</asp:HyperLink>

the query for this gridview includes two additional fields not shown in the template above.  call them contact1 and contact2.  i want contact1 and contact2 to appear in a single column in a new row beneath all of the columns above.  i don't want to run a new query or go back to the server, i just want a new row with contact1 and contact2 to become visible and for the rest of the rows beneath to be correctly formated.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 9 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros