Datagrid hidden column does not generate html object?

R

rockdale.green

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top