Hi,
Code block is below.
I want to show value conditionally and i can not edit model block .
is there a way to do this.
i know it's not working like i do .
Thanks for help
Code block is below.
I want to show value conditionally and i can not edit model block .
is there a way to do this.
i know it's not working like i do .
@(Html.Kendo().Grid(Model)
.Name("somegrid")
.Columns(columns =>
{
columns.Bound(Folder => Folder.ParentId).Template(@<
text
>
<
strong
>@if (item.ParentId > 0)
{
<
span
>@callfunction(item.Name) (call some serverside function using item variable which returns string ( but not parentId another one ) )</
span
>
}
else
{
<
span
>@call some serverside function</
span
>
}
</
strong
>
</
text
>);
columns.Command(command => { command.Edit().Text("Güncelle").UpdateText("Güncelle").CancelText("İptal"); command.Destroy().Text("Sil"); }).Width(180);
})
.ToolBar(toolbar => toolbar.Create().Text("Yeni kayit ekle"))
.Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("FolderEditPopup").DisplayDeleteConfirmation("Kaydı silmek istediğinizden emin misiniz ?"))
.Pageable(pager => pager
.Messages(messages => messages.Display("{0} - {1}. Toplam {2} kayıt")
.ItemsPerPage("")
.First("İlk sayfa")
.Last("Son sayfa")
.Next("Sonraki")
.Page("Sayfa")
.Previous("Önceki")
.Refresh("Yenile"))
)
.Sortable()
.Scrollable()
.Events(e => e.Edit("onEdit"))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(100000)
.Model(model =>
{
model.Id(p => p.IntId);
model.Field(p => p.ParentId).DefaultValue(0);
})
.Events(events => events.Error("error_handler"))
.Create(update => update.Action("FolderPopup_Create", "Config"))
.Read(read => read.Action("FolderPopup_Read", "Config"))
.Update(update => update.Action("FolderPopup_Update", "Config"))
.Destroy(update => update.Action("FolderPopup_Destroy", "Config"))
)
)
Thanks for help