I Want to apply "EnableSpellCheck " property throughout my .Net(4.0) application.I have all my webhtmleditor in many *.ascx files and am dynamically referring all the .net usercontrols to home.aspx page. How to achieve this in code?
How to globally set "EnableSpellCheck" property to all webhtmleditors in code ?
Hello Sarathi,
Thank you for posting in our forums!
I have done some research on this and found that EnableSpellCheck cannot be set globally. You have to set "EnableSpellCheck” property on each WebHtmlEditor control.
Let me know if I may be of further assistance.
Hi Divya,
how to loop through all the webhtmleditors and set the enablespellcheck property for page level. Please provide the code snippets
The structure that you have provided doesn’t really change the approach that is needed here. Whether the controls are in a UserControl or on your main page in the end you will need to take the same approach of iterating over collections of controls recursively working your way down the hierarchy until you have found the controls that have the properties you want to set.This approach is not specific to Infragistics controls and would be the same approach that you would take for any ASP.NET server control.The information that I have provided previously demonstrates how you can look through the hierarchy and find the controls to apply the setting. Do you have any questions or concerns about the approach that I have provided?Please note that if you need assistance creating a solution based specifically on the design of your application Infragistics has a Consulting Service team that would be able to work with you to provide what you need. For more information, please see the following page:http://d3.infragistics.com/Infragistics supplements their great UI products with user experience training and Consulting by UI architects Experts
))Hello Divya,
I have main.aspx on page load event am dynamically adding multiple .net-webusercontrols(based on my business criteria).
For example :i have first.ascx file and below is my mark up
<asp:panel id ="pnlwebhtml">
<table><tr><td><igh_edit:WebHtmlEditor> here is my webhtmleditor </igh_edit:WebHtmlEditor></td></tr>
</table>
</asp:panel> like wise i have many panels in first.ascx file. accordingly i have many webhtmleditors in another webusercontrols.
Now, On page load event of main.aspx file , i have to set "EnableSpellCheck" property ="true".(Note: In main.aspx page(Loading many webusercontrols dynamically,In that i have to set spellcheecker property). How to achieve this is in C# code or else is it possible to set the above property in Jquery/Javasscript code.
Thanks much.
Hello Sarathi,It is difficult to provide code without knowing the structure of your page and UserControls. To find a control you would have to iterate over all of the controls on a page, check to see if those have child controls, iterate over those child collections, and continue this search recursively.As an example, please see the following code that demonstrates how to find WebHtmlEditors that are located in a ContentPlaceHolder control. The approach you would use for UserControls would be very similar:Control ph = Form.FindControl("ContentPlaceHolder1"); foreach (Control c in ph.Controls) { WebHtmlEditor editor = c as WebHtmlEditor; if (editor != null) { editor.EnableSpellCheck = true; } }Please let me know if you have any questions or concerns about this approach.