Click here to Skip to main content
15,881,139 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
1 having difficulty reducing the height of a gridview, how do I correct it in the codes below.

2. I need to create a new gridview which will sit directly on the current which coordinates do I replicate from the codes below




XML
<div style="height: 100px">
                  <asp:GridView ID="GridView1" runat="server" AllowPaging="True"
                      AllowSorting="True" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
                      Height="10px" onselectedindexchanged="GridView1_SelectedIndexChanged1"
                      PageSize="8" Width="754px">
                      <Columns>
                          <asp:CommandField ShowSelectButton="True" />
                          <asp:BoundField DataField="IDNO" HeaderText="IDNO" SortExpression="IDNO" />
                          <asp:BoundField DataField="ID_CODE" HeaderText="ID_CODE"
                              SortExpression="ID_CODE" />
                          <asp:BoundField DataField="CUSTOMER" HeaderText="CUSTOMER"
                              SortExpression="CUSTOMER" />
                          <asp:BoundField DataField="APPRS_NO" HeaderText="APPRS_NO"
                              SortExpression="APPRS_NO" />
                          <asp:BoundField DataField="INT_NO" HeaderText="INT_NO"
                              SortExpression="INT_NO" />
                          <asp:BoundField DataField="INT_NAME" HeaderText="INT_NAME"
                              SortExpression="INT_NAME" />
                      </Columns>
                  </asp:GridView>
                  <asp:SqlDataSource ID="SqlDataSource1" runat="server"
                      ConnectionString="<%$ ConnectionStrings:Credit_AppConnectionString12 %>"
                      SelectCommand="SELECT [IDNO], [ID_CODE], [CUSTOMER], [APPRS_NO], [INT_NO], [INT_NAME] FROM [LOANS] ORDER BY [IDNO]">
                  </asp:SqlDataSource>
              </div>
Posted
Updated 17-Jun-14 19:07pm
v2

1 solution

Are you sure the problem, the way you formulated it, worth resolving? I doubt it.

If the height is the problem, review your UI design and styling, say, introduce paging. Never sacrifice readability for the sake of condensed view (which itself could be good; it depends). Always remember that the user does not want to see too much information at once.

—SA
 
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