BobNoobGuy
BobNoobGuy

Reputation: 1645

Hide gridview but show the paging/page link?

Hi can I hide gridview but keep the page row visible? I want user to be able to flip through the pages in gridview and my code behind will display certain data in that gridview.

but The gridview itself is not needed for the user. I just need the page to be visible

any tricks or tips. I am thinking of using CSS but haven't found one yet

thanks for the help

enter image description here

<table cellspacing="0" rules="all" border="1" id="GridViewMemory" style="border-collapse:collapse;">
    <tr>
        <th scope="col"><a href="">header1</a></th><th scope="col"><a href="">header2</a></th>
    </tr><tr>
        <td>31668-2</td><td>6</td>
    </tr><tr>
        <td>31668-1</td><td>6</td>
    </tr><tr>
        <td>30999-3</td><td>6</td>
    </tr><tr>
        <td>30037-7</td><td>6</td>
    </tr><tr>
        <td>30037-6</td><td>6</td>
    </tr><tr>
        <td>30037-3</td><td>6</td>
    </tr><tr>
        <td>30037-10</td><td>6</td>
    </tr><tr>
        <td>18897-2</td><td>6</td>
    </tr><tr>
        <td>18109-7</td><td>6</td>
    </tr><tr>
        <td>18109-6</td><td>6</td>
    </tr><tr>
        <td colspan="2"><table>
            <tr>
                <td><a href="">1</a></td><td><a href="">2</a></td><td><a href="">3</a></td><td><a href="">4</a></td><td><a href="">5</a></td><td><a href="">6</a></td><td><a href="">7</a></td><td><a href="">8</a></td><td><span>9</span></td><td><a href="">10</a></td><td><a href="">...</a></td>
            </tr>
        </table></td>
    </tr>
</table>

Upvotes: 0

Views: 216

Answers (1)

Nicholas Hazel
Nicholas Hazel

Reputation: 3750

Here you go:

Fiddle: http://jsfiddle.net/SinisterSystems/smF7b/1/

table td, table th {
    display:none;
}
table tr:last-child td {
    display:table-cell;
}

Just hide all td and th and show your last tr's tds in a table-cell display property.

Upvotes: 1

Related Questions