This is a migrated thread and some comments may be shown as answers.

[Solved] UIHintAttribute cshtml

1 Answer 80 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Louis
Top achievements
Rank 1
Iron
Iron
Iron
Louis asked on 07 Jan 2012, 04:58 PM
Hello,

I have a filed decorated like this :

[UIHint("ListeLocalisations", "Field1", "NoLocalisation", "Field2", "CodeDescription_fr")]
public int? NoLocalisation { get; set; }

And in EditorTemplate something like this :

@using Telerik.Web.Mvc.UI
 
@(Html.Telerik().DropDownList().Name(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))
.BindTo(new SelectList((System.Collections.IEnumerable)ViewBag.DropDownListLocalisations, "NoLocalisation", "CodeDescription_fr")))


I have to create a new cshtml file for each dropdownlist because only some values changes. 
I want the UIHintAttribute "Field1", "NoLocalisation", etc in the cshtml.  
 How Can I pass the parametres of the IUHINT to the EditorTemplate file?




1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 09 Jan 2012, 02:24 PM
Hello Louis,

 This issue is not directly related to our controls - UIHintAttribute and editor templates are coming from the MVC framework itself. I would suggest to check the Net for possible solutions. For example, this blog post might be of help.

Kind regards,
Georgi Tunev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
General Discussions
Asked by
Louis
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Georgi Tunev
Telerik team
Share this question
or