By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,948 Members | 838 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,948 IT Pros & Developers. It's quick & easy.

How to set attribute to the controls in datagrid?

P: 16
Hi,

I have datagrid control which contains textboxs in ItemTemplate. I need to set attribute to the textbox for the purpose of accessing the client side java script function.

Here is my code snip.

[INLINECODE]

<asp:TemplateColumn HeaderText="Fld Date">
<ItemTemplate>
<%# (DataBinder.Eval(Container.DataItem,"DATE","{0:d}" ).ToString()) %>
</ItemTemplate>
<ItemStyle VerticalAlign="Top" />
<EditItemTemplate>
<asp:TextBox id="txtDate" runat="server" /><asp:TextBox id="txtDate" runat="server" />
</EditItemTemplate>
<FooterStyle VerticalAlign="Top" />
</asp:TemplateColumn>

[/INLINECODE]

Here i need to set the attribue when edit the datagrid item.
Please help me.

Thanks in advance.

Satees
Apr 19 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.