Solved

gridview paging disappear

Posted on 2007-11-19
3
765 Views
Last Modified: 2008-02-01
Can anyone can explain to me why if I render the ID column invisible on the gridview  using this code...

the paging row disappear (so the paging is notdisplayed)
And how can I then not render the ID but keeping the paging ??

Thanks

Protected Sub GridView1_RowCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowCreated

        e.Row.Cells(0).Visible = False

    End Sub

Open in new window

0
Comment
Question by:brillox
3 Comments
 
LVL 4

Expert Comment

by:iuconStefan
ID: 20313567
try this

If e.Row.RowType = DataRow e.Row.Cells(0).Visible = False

to hide only datarows. Otherwise also Header, Footer and Pager are affected
0
 
LVL 11

Accepted Solution

by:
DotNetThinker earned 250 total points
ID: 20313886
Can't you just set the ID column to Visible="false" in the markup?
0
 

Author Comment

by:brillox
ID: 20314286
Hi Dotnetthinker,

Yes you are right :)
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now