c# - Kendo UI grid template column -
i have grid in page , works great :
@(html.kendo().grid<salaryadmin.classes.returnedcomparehoghough>() .name("grid") .enablecustombinding(true) .bindto(model.comparehoghough) .columns(columns => { columns.template(@<text><input type="text" name="@item.mellicode" class="sel" /></text>).width(50); columns.bound(o => o.momayezfinaltax).format("{0:n0}").title("مالیات قابل پرداخت پس از اعمال معافیت موضوع ماده 92 (ویژه مناطق کمتر توسعه یافته) نظر ممیز"); columns.bound(o => o.finaltax).format("{0:n0}").title("مالیات قابل پرداخت پس از اعمال معافیت موضوع ماده 92 (ویژه مناطق کمتر توسعه یافته)"); }) .pageable() .navigatable() .datasource(datasource => datasource.server().total((int)viewdata["totalmoadi"])) ) i replace grid version :
@(html.kendo().grid<salaryadmin.classes.returnedcomparehoghough>() .name("grid").enablecustombinding(true).bindto(model.comparehoghough) .columns(columns => { columns.template(@<text><input type="text" name="@item.mellicode" class="sel" /></text>).width(50); columns.bound(o => o.momayezfinaltax).format("{0:n0}").title("مالیات قابل پرداخت پس از اعمال معافیت موضوع ماده 92 (ویژه مناطق کمتر توسعه یافته) نظر ممیز").width(200).clientfootertemplate("#=sum#"); columns.bound(o => o.finaltax).format("{0:n0}").title("مالیات قابل پرداخت پس از اعمال معافیت موضوع ماده 92 (ویژه مناطق کمتر توسعه یافته)").width(200).clientfootertemplate("#=sum#"); }) .pageable() .scrollable(scr => scr.height(420)) .datasource(datasource => datasource.ajax().aggregates( ag => { ag.add(h => h.momayezfinaltax).sum(); ag.add(h => h.finaltax).sum(); } ).read(read => read.action("changehoghough_read", "list", new { id = model.list.guidlist }))) ) it works great except textbox not displayed. possible display text in seond version? if yes, how can entered value in postback? tried in paging event in paging event linq code posted.
i'm assuming point of different grids move server binding ajax binding. text box isn't displayed because using server template instead of client side template. seek column:
columns.clienttemplate("#: <input type='text' name='mellicode' class='sel' /> #")... the syntax bit different, here's overview. i'm not sure bindto parameter might mean getting info twice on initial load.
c# jquery asp.net-mvc kendo-ui kendo-grid
No comments:
Post a Comment