Click here to Skip to main content
15,907,905 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have multiple html tables in repeater control.
How to disable each html table that means all rows in repeater control?
Posted
Updated 18-Mar-15 0:53am
v2
Comments
F-ES Sitecore 18-Mar-15 6:58am    
What do you mean by disable a table? Html tables are not interactive so can't be enabled\disabled.
Member 9018012 18-Mar-15 7:04am    
I know, But I used html tables in item template. I would like to disable all items when binding. I'm looking alternate option instead of disable each item separate which means text box, check boxes etc.,
F-ES Sitecore 18-Mar-15 7:33am    
You can do it with javascript

http://www.qodo.co.uk/blog/javascript-enabling-and-disabling-form-field-elements/

or just add disabled=disabled attributes to the elements in your aspx markup?
Member 9018012 18-Mar-15 7:34am    
Thanks

1 solution

XML
eg

if (CurrentValidationMessage.Link != "")
{
show a hyperlink
}
Markup:
<asp:Repeater ID="repValidationResults" runat="server">
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<a href='<%# ((MttImportValidationMessage)Container.DataItem).EditLink %>'> Link to erroneous Milestone </a>
<%# ((MttImportValidationMessage)Container.DataItem).Message %>
<br />
</ItemTemplate>
</asp:Repeater>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900