html5 - How to create Kendo controls with security markup -


i developing mvc web application , on razor views intent use kendo controls or html5 controls , assign role-based security html5/kendo controls within tag , not in c# code or javascript code. how can 1 this?.

i pasted sample code developed in asp.net page, need in mvc razor views.

thanks, - vijaya.

code below:

<abcd123:abcd123securitycontext id="msc" runat="server" abcd123security-entity="centergroup"     abcd123security-accesslevel="compose" abcd123security-accesslevelifqs="edit" abcd123security-qsparameters="groupid"     abcd123security-showmode="plaintext" /> <abcd123:abcd123securitypageaccess id="mspa" abcd123security-accesslevel="read" runat="server"     abcdtx-qsparameters="groupid" /> 

i can think of 3 ways off of top of head. if converting razor , want to, example, apply 'data-attribute' @ configuration time can set use htmlattribute common controls , clienttemplate controls supporting method. also, extend kenod.mvc wrappers inside of own extension methods adding security requirements property. access controls similar to:

@(html.mycontrol()     .name("mycontrol")     .securityaccess("read") ... ) 

in complete honesty htmlhelper class above links make new extensions consumed razor htmlatrribute

@(html.kendo().menu().htmlattributes(new {data-access-level="read"}) ... ) 

clienttemplate

@(html.kendo().grid<some.domain.data.someobject>().htmlattribute(new {data-grid-attribute='@model.someid'}    .name("grdmy")            .columns(columns =>    {         columns.bound(t => t.myfield).width(65).title("mytitle")             .clienttemplate("#if(myfield!=null){# <a class='test' href='javascript:void(0)' data-custom-field='#=myid#' data-custom-field2='#=myid2#'>#=displaytext#</span> #} else {##}#")    } } 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -