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. populate details view or list view with non empty rows

populate details view or list view with non empty rows

Scheduled Pinned Locked Moved ASP.NET
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.
  • C Offline
    C Offline
    code_explorer
    wrote on last edited by
    #1

    Dear friends, I want to populate a formview or details view or list view in such a way that empty rows will not be displayed at all i.e. suppose there are records in a database having name, age and qualification field. I have some records which do not have age field. I want to populate formview or details view or list view in such a way that for those who have age their records are diplayed alongwith their age. But who don't have, instad of displaying empty fields I do not want to show its row alongwith its label (age) at all. One more thing. How to display multiple records (say 5) in formview or details view or list view alongwith paging (I know paging but don't know how to display particular no of records per page). I will be very much thankful.

    B 1 Reply Last reply
    0
    • C code_explorer

      Dear friends, I want to populate a formview or details view or list view in such a way that empty rows will not be displayed at all i.e. suppose there are records in a database having name, age and qualification field. I have some records which do not have age field. I want to populate formview or details view or list view in such a way that for those who have age their records are diplayed alongwith their age. But who don't have, instad of displaying empty fields I do not want to show its row alongwith its label (age) at all. One more thing. How to display multiple records (say 5) in formview or details view or list view alongwith paging (I know paging but don't know how to display particular no of records per page). I will be very much thankful.

      B Offline
      B Offline
      badgrs
      wrote on last edited by
      #2

      Why not put a WHERE clause in your SQL? WHERE age != null OR age != ''

      C 1 Reply Last reply
      0
      • B badgrs

        Why not put a WHERE clause in your SQL? WHERE age != null OR age != ''

        C Offline
        C Offline
        code_explorer
        wrote on last edited by
        #3

        Sir, If I will use that sql query then null age records will not be included in dataset. I just want to eliminate empty rows alongwith their lables in my details or form or list view.

        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