asp.net mvc 2 - telerik grid and ajax -
i'm trying create page using asp.net mvc 2 shows 2 things:
1. upper half of page should show form 2. lower half should show results based on information form
what tried using ajax.beginform , update lower half of page using updatetargetid. basically, worked. however, results contain telerik grid pageable. trouble starts.
the grid shows fine, starts going wrong when try navigate through grids pages. plain (non-ajax) grid, uses links. if use variant of grid, trouble because links request new page, not contain information form , stack of errors.
if turn on ajax, doesn't work either because won't work on partial view retrieved via ajax (script tags won't work in case). in case, json result object rendered plain text.
if put on single page, can work well. reason, grid won't use ajax. on index-view use following code render grid:
html.telerik().grid<foobarlistitem>() .name("foobar") .databinding(databinding => databinding.ajax().select("_paging", "foobar")) .toolbar(commands => commands .custom() .htmlattributes(new { id = "export", onclick = onclickvalue }) .text(html.alias("default", "exportcsv")) .url("#") ) .columns(columns => { //template column shows action link columns.bound(o => o.datum); columns.bound(o => o.verbruiklaag); columns.bound(o => o.verbruiknormaal); columns.bound(o => o.verbruikpiek); }) .scrollable(scrolling => scrolling.height(200).enabled(false)) .pageable() .localizable("nl-nl") .render(); }
but whether put ajax-databinding in or not, still renders table in same way. have idea i'm going wrong?
check this topic. ajax.beginform not execute javascript returned in ajax response default , need jquery code make work. topic shows required code. not required new unobtrusive ajax framework introduced asp.net mvc 3.
Comments
Post a Comment