Click here to Skip to main content
15,916,693 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I am a using a gridview in my page and i am printing that gridview.But while i am printing it i was not able to print complete gridview.
how can i reduce the width of a gridview.
Posted

Have it inside an HTML table. fix the tables width in pixels as per you need.
 
Share this answer
 
fix the width (as required )of each column of your gridview


see below example.

XML
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False">
            <Columns>
                <asp:BoundField HeaderText="col1">
                    <ItemStyle Width="200px" />
                </asp:BoundField>
                <asp:BoundField HeaderText="col2">
                    <ItemStyle Width="50px" />
                </asp:BoundField>
            </Columns>
        </asp:GridView>
 
Share this answer
 

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