Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi I have a SQL quary which returns one Row.So i want to display that data vertically in a data grid. I used GridView & Hardcode those columns but it looks ugly & also am unable to get the grid theme.

Please help me to print grid display as a panel display.

Thank you..
Posted
Updated 25-May-12 3:21am
v2

try like this

XML
<asp:TemplateField HeaderText="Name" HeaderStyle-Font-Size ="Medium" HeaderStyle-Width ="150px" HeaderStyle-Font-Names ="Microsoft Sans Serif" >

                    <ItemTemplate>
                     <div style ="width :150px;font-size :medium ;font-family :Microsoft Sans Serif  ">
                        <asp:Label ID="lblID" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"Name") %>'></asp:Label>
                  </div>
                    </ItemTemplate>
 
Share this answer
 
Create a table inside <itemtemplate> and place the columns bindings using labels inside each row.

The above should solve the problem.</itemtemplate>
 
Share this answer
 
v2
Comments
myansweris 29-May-12 10:38am    
Thanks...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900