telerik-mvc

Define a Template column for Telerik MVC Grid in Razor syntax

眉间皱痕 提交于 2019-12-04 16:30:54
问题 I have the following legacy code that I would like to mimic, with all action links inside one column. However, I can't seem to get the Razor syntax right. How should I express this in Razor? The ASPX column template is like this: .Columns(column => { column.Template(o => {%> <%= Html.ActionLink("Edit", "Edit", new{ id = o.DeviceID}) %> | <%= Html.ActionLink("Delete", "Delete", new { id = o.DeviceID })%> <%}); I have only been able to get three separate columns using Razor without complaints

Problem rendering Telerik MVC Grid in a Razor view

别来无恙 提交于 2019-12-04 12:57:54
I have the following markup in a 'content' page. Without the Render call, nothing renders, and with the Render call, the grid renders as the first element in the whole page, not inside the 'content' section defined by my view: @using Telerik.Web.Mvc.UI @model Outdoor.Mvc.ViewModels.OutdoorSite.SiteList @{ Html.Telerik().Grid(Model.ItemList).Name("Site Grid") .Columns(columns => { columns.Bound(o => o.SiteId); columns.Bound(o => o.Name); }) .Pageable() .Sortable() .Render(); } What am I doing wrong? This is because of different approach to rendering Razor's views. In order to make it work you

GPL 2.0 Free Telerik Extensions for ASP.NET MVC [closed]

北城余情 提交于 2019-12-04 08:04:28
Is my ASP.NET MVC project automatically GPL 2.0 licensed by including these libraries? I always find this confusing with the GPL. Yes, it is. You'll be statically referencing their code. That clearly falls under the "requires a GPL-compatible license" areas. You can, of course, buy a commercial license or use a different component if you don't want to GPL your project. Your application only requires a GPL license when you distribute your application. For example: Scenario #1: You develop a website which uses a mysql database and the Telerik ASP.NET MVC controls (both GPL Open Source licenses).

Define a Template column for Telerik MVC Grid in Razor syntax

孤街醉人 提交于 2019-12-03 10:27:56
I have the following legacy code that I would like to mimic, with all action links inside one column. However, I can't seem to get the Razor syntax right. How should I express this in Razor? The ASPX column template is like this: .Columns(column => { column.Template(o => {%> <%= Html.ActionLink("Edit", "Edit", new{ id = o.DeviceID}) %> | <%= Html.ActionLink("Delete", "Delete", new { id = o.DeviceID })%> <%}); I have only been able to get three separate columns using Razor without complaints about syntax etc. as below: .Columns(columns => { columns.Template(o => @Html.ActionLink("Edit", "Edit",

How to bind images in Telerik Grid for ASP.NET MVC

◇◆丶佛笑我妖孽 提交于 2019-12-02 19:24:23
问题 Please let me know how to bind a image static image with all rows in Telerik Grid for ASP.NET MVC. <%= Html.Telerik().Grid(Model.SearchResponse) .Name("SearchGrid") .Columns(columns => { //Here i need to bind a static image column// columns.Bound(grid => grid.Name); columns.Bound(grid => grid.CaseNumber); }) .Pageable(true) %> 回答1: This is possible by adding another templated column to your collection: Using ASPX columns.Template(c => { %><img alt="Static Image Alt Text" src="<%= Url.Content(

Kendo-UI - Creating a Dynamic Form via JSON

浪子不回头ぞ 提交于 2019-12-02 17:26:19
问题 I have been able to successfully build out a dynamic form using JSON and Kendo.Observable, however I cannot initialize the dropdownlist values successfully within the same JSON. The only way I can get it to work is by binding the dropdown lists to a separate json request after creation. See the example below.... Here is an example of some JSON that works (no dropdown list) {"fields": [ {"name" : "FirstName", "label" : "First Name", "type" : "text", "css" : "test"}, {"name" : "LastName",

Request.IsAuthenticated Return False all the time

不羁的心 提交于 2019-12-02 13:24:48
问题 I am having an issue with my Request.IsAuthenticated always return false. I am setting the AuthCookie CurrentRequest currentRequest = null; if (Url.IsLocalUrl(returnUrl) && returnUrl.Length > 1 && returnUrl.StartsWith("/") && !returnUrl.StartsWith("//") && !returnUrl.StartsWith("/\\")) { return Redirect(returnUrl); } else if (login.ValidateUser(acct.UserName, acct.Password)) { FormsAuthentication.SetAuthCookie(acct.UserName, true); //Edit on 11/12 @11:08 currentRequest = new CurrentRequest();

How to bind images in Telerik Grid for ASP.NET MVC

谁说胖子不能爱 提交于 2019-12-02 12:13:01
Please let me know how to bind a image static image with all rows in Telerik Grid for ASP.NET MVC. <%= Html.Telerik().Grid(Model.SearchResponse) .Name("SearchGrid") .Columns(columns => { //Here i need to bind a static image column// columns.Bound(grid => grid.Name); columns.Bound(grid => grid.CaseNumber); }) .Pageable(true) %> This is possible by adding another templated column to your collection: Using ASPX columns.Template(c => { %><img alt="Static Image Alt Text" src="<%= Url.Content("~/myImage.jpg") %>" /><% }).Title("Static Image"); Using Razor columns.Template( @<text> <img alt="Static

Telerik MVC custom AJAX editor template

ⅰ亾dé卋堺 提交于 2019-12-01 23:06:56
问题 I am using the MVC version of the Telerik controls with ASP.NET MVC and the razor view engine . I have an AJAX grid. When I click edit I want it to display the data in form style. But the issue is that I want to rearrange the in form controls they way that I want them to display. How would I do something like that? Currently the controls are all beneath each other. I want to create my own layout for editing. I have a whole lot of other controls on the view, one of them being this grid. My

Floating horizontal scroll bar for html table

南楼画角 提交于 2019-12-01 20:54:24
I have an html table that is very tall. The web page has to be scrolled vertically to reach the scroll bar at the bottom of the table. It would be nice if I could float the horizontal scroll bar for the table at the bottom of the browser window while the user is scrolling the page and the table is visible. Can such a thing be done? Here is a jsFiddle example of the situation: http://jsfiddle.net/RurTZ/1/ The Grid suggestion by @KDavid is good, but if you're looking for something a bit lighter I had success with the the floatingScrollbar jQuery plugin ( demo ). After making sure the plugin JS