Solved

gridview paging disappear

Posted on 2007-11-19
3
768 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

770 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