This question is locked. New answers and comments are not allowed.
Hello guys, I've just got in touch with Telerik MVC extensions and I think that they are awesome!
But I've stumbled on small problem. It's probably me, but I just don't know what I am doing wrong.
My grid is inside bigger page, showing details for ViewModel of a page. Grid is using Ajax binding:
@(Html.Telerik().Grid<KontiranjeDokumentaVM>(Model.Kontiranja).Name("Kontiranja")
.DataKeys(k => k.Add(m => m.IdKontiranjeDokumenta).RouteKey("IdKontiranjeDokumenta"))
.ToolBar(t => t.Insert())
.DataBinding(b => b.Ajax()
.Select("Select", "Dokument")
.Insert("Insert", "Dokument")
.Update("Update", "Dokument")
.Delete("Delete", "Dokument"))
.Columns(c =>
{
c.Command(cmd => { cmd.Edit().ButtonType(GridButtonType.Text); cmd.Delete().ButtonType(GridButtonType.BareImage); });
c.Bound(m => m.IdKontiranjeDokumenta).Hidden(true);
c.Bound(m => m.Datum).Hidden(true);
c.Bound(m => m.Key).Width("5%").
c.Bound(m => m.Uslov).Title("Uslov za kreiranje stava").Width("10%").
c.ForeignKey(m => m.StranaKnjizenja, new SelectList(ViewData["StraneKnjizenja"] as IEnumerable, "Key", "Text")).Width("5%");
c.Bound(m => m.Iznos).Width("10%"));
c.Bound(m => m.Partner).Width("10%"));
c.Bound(m => m.OrgJed).Width("10%"));
c.ForeignKey(m => m.Konto, new SelectList(ViewData["Konta"] as IEnumerable, "Key", "Text")).Width("15%"));
})
.Selectable().Filterable())
when i hover my mouse over edit button I get something like this:
http://localhost:9234/VrstaDokumenta/Edit/ZARADE?Kontiranja-mode=edit&IdKontiranjeDokumenta=2
and i successfully enter edit mode. But, when i want to update my changes (call my insert action of controller), NOTHING HAPPENS. Now when i hover over update button i get something like this:
http://localhost:9234/VrstaDokumenta/Edit/ZARADE#
I think that pound symbol is the problem, but i don't know what to do about it. I've tried adding some route values to my update ajax command but that didn't help:
.Update("Update", "Dokument", new { IdKontiranjeDokumenta = "<#= IdKontiranjeDokumenta #>" })
My Select, Insert and Delete Actions get called without any problems, it's just Update that wont get called.
I've been looking around forum but couldn't find any similar problem, which tells me that I am the problem, and I am probably missing someting presumed.
I would really appreciate any help to overcome this [small] obstacle because i cant wait to dig deeper.
Best regards,
But I've stumbled on small problem. It's probably me, but I just don't know what I am doing wrong.
My grid is inside bigger page, showing details for ViewModel of a page. Grid is using Ajax binding:
@(Html.Telerik().Grid<KontiranjeDokumentaVM>(Model.Kontiranja).Name("Kontiranja").DataKeys(k => k.Add(m => m.IdKontiranjeDokumenta).RouteKey("IdKontiranjeDokumenta"))
.ToolBar(t => t.Insert())
.DataBinding(b => b.Ajax()
.Select("Select", "Dokument")
.Insert("Insert", "Dokument")
.Update("Update", "Dokument")
.Delete("Delete", "Dokument"))
.Columns(c =>
{
c.Command(cmd => { cmd.Edit().ButtonType(GridButtonType.Text); cmd.Delete().ButtonType(GridButtonType.BareImage); });
c.Bound(m => m.IdKontiranjeDokumenta).Hidden(true);
c.Bound(m => m.Datum).Hidden(true);
c.Bound(m => m.Key).Width("5%").
c.Bound(m => m.Uslov).Title("Uslov za kreiranje stava").Width("10%").
c.ForeignKey(m => m.StranaKnjizenja, new SelectList(ViewData["StraneKnjizenja"] as IEnumerable, "Key", "Text")).Width("5%");
c.Bound(m => m.Iznos).Width("10%"));
c.Bound(m => m.Partner).Width("10%"));
c.Bound(m => m.OrgJed).Width("10%"));
c.ForeignKey(m => m.Konto, new SelectList(ViewData["Konta"] as IEnumerable, "Key", "Text")).Width("15%"));
})
.Selectable().Filterable())
when i hover my mouse over edit button I get something like this:
http://localhost:9234/VrstaDokumenta/Edit/ZARADE?Kontiranja-mode=edit&IdKontiranjeDokumenta=2and i successfully enter edit mode. But, when i want to update my changes (call my insert action of controller), NOTHING HAPPENS. Now when i hover over update button i get something like this:
http://localhost:9234/VrstaDokumenta/Edit/ZARADE#
I think that pound symbol is the problem, but i don't know what to do about it. I've tried adding some route values to my update ajax command but that didn't help:
.Update("Update", "Dokument", new { IdKontiranjeDokumenta = "<#= IdKontiranjeDokumenta #>" })My Select, Insert and Delete Actions get called without any problems, it's just Update that wont get called.
I've been looking around forum but couldn't find any similar problem, which tells me that I am the problem, and I am probably missing someting presumed.
I would really appreciate any help to overcome this [small] obstacle because i cant wait to dig deeper.
Best regards,