Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

C#/ASP.NET Table control

  • 13-04-2008 02:18AM
    #1
    Registered Users, Registered Users 2 Posts: 1,391 ✭✭✭


    Probably something real simple but how can I add an empty row to a table in ASP.NET?


Comments

  • Registered Users, Registered Users 2 Posts: 1,391 ✭✭✭fatherdougalmag


    Never mind. Cell.Text = " " does the trick.


  • Registered Users, Registered Users 2 Posts: 6,762 ✭✭✭WizZard


    Never mind. Cell.Text = " " does the trick.

    That's a bit of a hack, is there no better way?? What version of ASP.NET are you using?


  • Moderators, Science, Health & Environment Moderators Posts: 9,226 Mod ✭✭✭✭mewso


    Hack or not it's the best way to do it since any table with nothing in the cell will not be visible, in IE at least.


  • Moderators, Society & Culture Moderators Posts: 9,688 Mod ✭✭✭✭stevenmu


    Yep, it's not an ASP related problem, that will create the empy row no problem, the problem is that some browsers won't render it correctly.

    The other thing people do, apart from &nbsp, is to create a 1 pixel transparent gif and put that in the cell (IIRC firefox/mozilla will sometimes render the actual characters &nbsp instead of a blank space).


Advertisement