Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. columns.Bound(c => c.isSelect).Title("").ClientTemplate("#= GetEditTemplate(data)#").Width(120);
  2.  
  3. function GetEditTemplate(data) {
  4. var html;
  5. var statusText = $("#Status").val().toLowerCase();
  6. if (data.isSelect === true) {
  7. if (statusText != "canceled" ) html = kendo.format("<a class="k-button" href='" + '@Url.Action("EditedStuff", "MyController")' + "?Id={0}" + "'>Details</a>", data.Id);
  8. else html = kendo.format("<a class="k-button k-state-disabled" href='" + '@Url.Action("EditedStuff", "MyController")' + "?Id={0}" + "'>Details</a>", data.Id);
  9. else {
  10. if (data.viewId != null) {
  11. html = kendo.format("<a class="k-button" href='" + '@Url.Action("View", "MyController")' + "?vid={0}" + "' target='_blank'>View </a>", data.viewId);
  12. //need help here where there should be another button with "select" option
  13. }
  14. }
  15. return html;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement