Link to home
Start Free TrialLog in
Avatar of brillox
brilloxFlag for United Kingdom of Great Britain and Northern Ireland

asked on

gridview paging disappear

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

Avatar of iuconStefan
iuconStefan
Flag of Germany image

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
ASKER CERTIFIED SOLUTION
Avatar of DotNetThinker
DotNetThinker
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of brillox

ASKER

Hi Dotnetthinker,

Yes you are right :)