Hello,
I have a context menu displayed on right clicking kendo grid like this.
@(Html.Kendo().ContextMenu()
.Name("menuGrid")
.Target("#Grid_ObjActivity")
.Orientation(ContextMenuOrientation.Vertical)
.Animation(animation =>
{
animation.Open(open =>
{
open.Fade(FadeDirection.In);
open.Duration(500);
});
})
.Items(items =>
{
items.Add()
.Text("Herunterladen")
.ImageUrl(Url.Content("~/Images/Download.png"));
items.Add()
.Text("Löschen")
.ImageUrl(Url.Content("~/Images/Delete.png"));
})
.Events(e => e.Select("ContextClick"))
)
This is ok but i would like to have the items added dynamically depending on type of row clicked on grid. Each row in grid has a different type and right clicking show a different context menu with different action.
How can i achieve this in my razor view.
Thanks
Anamika
I have a context menu displayed on right clicking kendo grid like this.
@(Html.Kendo().ContextMenu()
.Name("menuGrid")
.Target("#Grid_ObjActivity")
.Orientation(ContextMenuOrientation.Vertical)
.Animation(animation =>
{
animation.Open(open =>
{
open.Fade(FadeDirection.In);
open.Duration(500);
});
})
.Items(items =>
{
items.Add()
.Text("Herunterladen")
.ImageUrl(Url.Content("~/Images/Download.png"));
items.Add()
.Text("Löschen")
.ImageUrl(Url.Content("~/Images/Delete.png"));
})
.Events(e => e.Select("ContextClick"))
)
This is ok but i would like to have the items added dynamically depending on type of row clicked on grid. Each row in grid has a different type and right clicking show a different context menu with different action.
How can i achieve this in my razor view.
Thanks
Anamika