Put links with conditions in a row of kendo grid -
i want add action grid based on state of record, in web-grid looks this
grid.column(format: @<text> @if(item.state == state.working) { @: | @html.actionlink("pause", "pause", new { id = item.id }) }else if(item.state == state.pause) { @:| @html.actionlink("continue", "continue", new { id = item.id }) } </text> )
how can done in grid of kendo?
edit: need ajax grid version
pseudo code:
columns.bound(x => x.state ).clienttemplate( "# if ( state == 'working' ) { #" + html.actionlink("pause", "pause", new { id = item.id })..tohtmlstring() + "# } else { #" + html.actionlink("continue", "continue", new { id = item.id})..tohtmlstring() + "# } #" ).title("state")
Comments
Post a Comment