Datagrid hidden column does not generate html object?

Discussion in 'ASP .Net Web Controls' started by rockdale.green@gmail.com, Jun 6, 2006.

  1. Guest

    Hi, All:

    I have a datagrid with TemplateColumns as following:

    <asp:TemplateColumn HeaderText="" Visible="False" ItemStyle-Width="0">
    <ItemTemplate> <asp:Label id="lblLowerBound" runat="server"
    Text='<%# DataBinder.Eval(Container, "DataItem.min_value") %>'>
    </asp:Label>
    </ItemTemplate>
    </asp:templateColumn>

    I set Visible="False" and ItemStyle-Width="0" because I do not want
    user to see the min_value.

    But the problem is if I view the html source this aspx generated, I did
    not find any html objects for this lblLowerBound. If I did not set
    visible= False. I will get <span id=......>.

    I have a client side javascript to access this object by client side
    id. So I need there is a html object but invisible to user. How do I
    achieve this?
    I set visible =false for the asp:lable object. It is the same, I did
    not get the <span > object for this label.

    Any idea?
    Thanks a lot
    -Rockdale
    , Jun 6, 2006
    #1
    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. me
    Replies:
    3
    Views:
    4,795
  2. =?Utf-8?B?Tmlja3k=?=

    How to put some hidden column in a DataGrid?

    =?Utf-8?B?Tmlja3k=?=, Feb 26, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    9,279
    Eliyahu Goldin
    Feb 27, 2005
  3. rockdale
    Replies:
    3
    Views:
    5,420
    rockdale
    Jun 7, 2006
  4. Tony D
    Replies:
    1
    Views:
    2,063
    Lorelai
    Nov 9, 2006
  5. rockdale

    Datagrid invisible TemplateColumn dose not generate HTML object?

    rockdale, Jun 6, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    251
    rockdale
    Jun 7, 2006
Loading...

Share This Page