Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Problem with DataGrid pages

Problem with DataGrid pages

Scheduled Pinned Locked Moved ASP.NET
helphtml
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Liborac_
    wrote on last edited by
    #1

    Hello guys, I have this problem with datagrid. When I create it using function RenderControl it wont create proper pages...it creates only labels but they are not clickable. Code looks like this:

    DataGrid dg = new DataGrid ();
    dg.AllowPaging = true;
    dg.PageSize = 10;
    dg.PagerStyle.Mode = PagerMode.NextPrev;
    dg.DataSource = ds;
    dg.DataBind ();
    dg.RenderControl ();

    The result HTML looks like this: <table cellspacing="0" rules="all" border="1" style="border-collapse:collapse;"> <tr> <td>IntegerValue</td><td>StringValue</td><td>CurrencyValue</td> </tr><tr> <td>0</td><td>Item 0</td><td>1,23</td> </tr><tr> <td><span>&lt;</span>&nbsp;<a>&gt;</a></td> </tr> </table> As you can see there is no links on the last row so no page can be changed :( Thanks in advance for any help.

    V 1 Reply Last reply
    0
    • L Liborac_

      Hello guys, I have this problem with datagrid. When I create it using function RenderControl it wont create proper pages...it creates only labels but they are not clickable. Code looks like this:

      DataGrid dg = new DataGrid ();
      dg.AllowPaging = true;
      dg.PageSize = 10;
      dg.PagerStyle.Mode = PagerMode.NextPrev;
      dg.DataSource = ds;
      dg.DataBind ();
      dg.RenderControl ();

      The result HTML looks like this: <table cellspacing="0" rules="all" border="1" style="border-collapse:collapse;"> <tr> <td>IntegerValue</td><td>StringValue</td><td>CurrencyValue</td> </tr><tr> <td>0</td><td>Item 0</td><td>1,23</td> </tr><tr> <td><span>&lt;</span>&nbsp;<a>&gt;</a></td> </tr> </table> As you can see there is no links on the last row so no page can be changed :( Thanks in advance for any help.

      V Offline
      V Offline
      Vimalsoft Pty Ltd
      wrote on last edited by
      #2

      I have passed your post several times , thinking mybe there is another way that i dont know that we can use for paging, but i cant understand what is your problem. why do you use "dg.RenderControl();"

      Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

      L 1 Reply Last reply
      0
      • V Vimalsoft Pty Ltd

        I have passed your post several times , thinking mybe there is another way that i dont know that we can use for paging, but i cant understand what is your problem. why do you use "dg.RenderControl();"

        Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

        L Offline
        L Offline
        Liborac_
        wrote on last edited by
        #3

        Well I must admit I am very new to ASP, I have inherited this project so i cant make any fundamental changes. The main idea is to create whole HTML page to a string variable and pass it for further process...

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups