Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
245
NullText and Model."Property" DisplayName
posted

Hi,

 

Is there any chance to use a Model property "DisplayName" in the NullText function of TextEditor?

 


Best Regards,

 

Francisco Correia

  • 3115
    Verified Answer
    Offline posted

    Hi fmcorreia,

    NullText accepts a string value. Can you clarify what you want to achieve?

    So if you create your TextEditorModel in your model, when you instantiate the model in the controller you can access NullText opiton. ->

    model.txtmodel.NullText =

     

    "DisplayName";

     

     

    If you use MVC helpers on your view, you can pass the value from your model property ("DisplayName") in the "ViewBag", or "ViewData" and then set use the value on the view.

    If you want to change the value at runtime keep in mind that the Editors MVC helper instantiate igEditor with specific type, so in your case to set the value for the nullText at runtime you need:

    $(".selector").igEditor("option", "nullText", "Enter Value");

    For more info about Cange options to editors at runtime see the follwing: http://help.infragistics.com/NetAdvantage/jQuery/2012.1/CLR4.0?page=Using_Events_in_NetAdvantage_for_jQuery.html

    Hope that helps?

    Thanks,