Datagrid not diplaying header text

Discussion in 'ASP .Net Datagrid Control' started by Atif Jalal, Jul 8, 2003.

  1. Atif Jalal

    Atif Jalal Guest

    I am trying have a datgrid which always displays the column header
    text, even though the datareader to which it is bound is empty.

    I have a datagrid on my page with data source bound to datareader. The
    datagrid does not display the header text when the datareader returns
    zero records.
     
    Atif Jalal, Jul 8, 2003
    #1
    1. Advertising

  2. use boundcolumn
    it will solve ur problem
    e.g.
    <asp:datagrid id=grd runat=server Border=1 ShowFooter="false"
    Font-Color="Green"
    AutoGenerateColumns="true"
    >

    <columns>
    <asp:BoundColumn HeaderText="id" DataField="fname" runat=server/>
    </columns>
    </asp:datagrid>

    Rajesh

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Rajesh Tiwari, Jul 8, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TimmyC
    Replies:
    0
    Views:
    1,542
    TimmyC
    Jun 8, 2007
  2. mlt
    Replies:
    2
    Views:
    853
    Jean-Marc Bourguet
    Jan 31, 2009
  3. hansiman

    Image in header column (not replacing column header text)

    hansiman, Feb 5, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    311
    hansiman
    Feb 7, 2004
  4. Henrik
    Replies:
    1
    Views:
    428
    Ken Cox [Microsoft MVP]
    Jul 6, 2006
  5. datagrid having row header and column header

    , Jul 13, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    185
Loading...

Share This Page