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
  1. Home
  2. Web Development
  3. ASP.NET
  4. Gridview not showing Empty data Template when Empty

Gridview not showing Empty data Template when Empty

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

    Hi all, I have been struggling to get this done but it has drilled a nail in my head. I have a grid as foll: and the code i m using is as follows Protected Sub Button_Search_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button_Search.Click Dim cmd As New SqlCommand() cmd.Connection = con cmd.CommandType = CommandType.StoredProcedure cmd.CommandText = "Blah Blah" Dim loc As String = Nothing If DDL_Location.SelectedValue <> "0" Then loc = DDL_Location.SelectedValue End If frmdate = DateTime.ParseExact(TextBox_Date_From.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.Cu

    A 1 Reply Last reply
    0
    • W www Developerof NET

      Hi all, I have been struggling to get this done but it has drilled a nail in my head. I have a grid as foll: and the code i m using is as follows Protected Sub Button_Search_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button_Search.Click Dim cmd As New SqlCommand() cmd.Connection = con cmd.CommandType = CommandType.StoredProcedure cmd.CommandText = "Blah Blah" Dim loc As String = Nothing If DDL_Location.SelectedValue <> "0" Then loc = DDL_Location.SelectedValue End If frmdate = DateTime.ParseExact(TextBox_Date_From.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.Cu

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      www.Developerof.NET wrote:

      can anyone get this code working!!!!!

      What is the problem? Did you try to debug it? what is the error ?

      cheers, Abhijit My Recent Article : Beginner's Guide to ASP.NET Application Folder

      W 1 Reply Last reply
      0
      • A Abhijit Jana

        www.Developerof.NET wrote:

        can anyone get this code working!!!!!

        What is the problem? Did you try to debug it? what is the error ?

        cheers, Abhijit My Recent Article : Beginner's Guide to ASP.NET Application Folder

        W Offline
        W Offline
        www Developerof NET
        wrote on last edited by
        #3

        The prob is that the Empty data template is not showing. Nothing is displayed. Its all blank. When i viewed the html source the grid renders as follows

        ie no text between the TR`s no TD`s When you fail to plan, you are planning to fail.

        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