or
|
Requirements |
|
|
Kendo UI Suite and Version |
|
|
jQuery Version |
|
|
Supported Browsers and Platforms |
|
|
Components/Widgets used |
|
@(Html.Kendo().NumericTextBoxFor(a => costRow.FTE) .Name(costRow.CostRowId + "_FTE") .Step(new decimal(0.5)) .Events(e => e .Change("fteChanged") .Spin("fteChanged") ) .HtmlAttributes(new { guid=costRow.CostRowId }))@(Html.Kendo().Grid(Model).Name("PriceList") .Columns(columns => { columns.Bound(p => p.Id).Hidden(); columns.Bound(p => p.Name); columns.Bound(p => p.ValidFrom).Format("{0:dd.MM.yyyy h:mm:ss}"); columns.Bound(p => p.ValidTill).Format("{0:dd.MM.yyyy h:mm:ss}"); columns.Bound(p => p.Created).Format("{0:dd.MM.yyyy h:mm:ss}"); columns.Bound(p => p.UserName); columns.Bound(p => p.FilePath); columns.Command(command => { command.Edit(); command.Destroy(); }); }) .DataSource(dataSource => dataSource.Ajax() .Model(model => { model.Id(p => p.Id); model.Field(p => p.ValidFrom).Editable(false); model.Field(p => p.ValidTill).Editable(true); model.Field(p => p.Created).Editable(false); model.Field(p => p.UserName).Editable(false); model.Field(p => p.FilePath).Editable(false); model.Field(p => p.Name).Editable(false); }) .Read("PriceList_Read", "Admin") .Destroy("PriceList_Editing_Destroy", "Admin") .Update(update=>update.Action("PriceList_Editing_Update", "Admin")) .Events(e=>e.Error("error_handler")) ) .Editable(editable => editable.Mode(GridEditMode.InLine)) .AutoBind(true))public ActionResult PriceList_Editing_Update([DataSourceRequest] DataSourceRequest request, PriceListViewModel model) { int Id = model.Id; string Name = model.Name; DateTime date = model.ValidTill; // 0001 00:00:00 value all the time return View("Index", GetViewResult()); }Actual falseFilePath D:\Projects\CPSkla\CPSkla\App_Data\Cen°k 2012_10.xlsxId 23Name Testovacà cenÃkUser 0User1 nullUserName djezekpublic partial class PriceListView { public int Id { get; set; } public int User { get; set; } public string Name { get; set; } public System.DateTime ValidFrom { get; set; } public System.DateTime ValidTill { get; set; } public string FilePath { get; set; } public Nullable<System.DateTime> Created { get; set; } public Nullable<System.DateTime> Updated { get; set; } public bool Actual { get; set; } public string UserName { get; set; } }<% Chart<CollectionItem<decimal?>> chart = Html.Telerik().Chart(Model.GraphData) .Name("chart") .Title(title => title .Text(Model.GraphTitle) .Visible(false) ) .Legend(legend => legend .Position(ChartLegendPosition.Top) .Visible(false) ) .SeriesDefaults(series => { series.Column().Stack(false); }) .Series(series => { series.Column(s => s.Value) .Name("Totalen") .Color("#1f3975") .Labels(labels => labels .Margin(-6) .Visible(true) .Template("<#= value #>") .Position(ChartBarLabelsPosition.OutsideEnd)); }) .CategoryAxis(axis => axis .Categories(s => s.Text) .Color("#000000") .Labels(labels => labels.Margin(-6).Visible(true)) .MajorGridLines(majorGridLines => majorGridLines.Color("#ddd")) ) .ValueAxis(axis => axis .Numeric().Labels(labels => labels.Margin(0).Format("{0:#,##0}")).Min(0) .MajorUnit(Model.GraphMajorUnit) .Color("#000000") .Labels(labels => labels.Visible(false)) .MajorGridLines(majorGridLines => majorGridLines.Color("#ddd")) ) .Tooltip(tooltip => tooltip .Visible(false) .Template("<#= category #>: <#= value #>") .Format("{0:#,##0}") ) .HtmlAttributes(new { style = "width: 225px; height: 78px;" }); chart.Render(); %>.ValueAxis(axis => axis .Numeric().Labels(labels => labels.Margin(0).Format("{0:#,##0}")).Min(0) .MajorUnit(Model.GraphMajorUnit) .Color("#000000") .Labels(labels => labels.Visible(false)) .MajorGridLines(majorGridLines => majorGridLines.Color("#ddd")) @(Html.Kendo().Grid<TaskDTO>(Model.Tasks) .Name("tasksTable") .Columns(columns => { columns.Bound( p => p.ID ).Width( 300 ); columns.Bound( p => p.Name ); columns.Bound( p => p.TaskType ); }) .ClientDetailTemplateId( "testTemplate" ) .Pageable() .Sortable() .Resizable( resize => resize.Columns( true ) ) .Events( events => events.DataBound( "dataBound" ) )) <script id="testTemplate" type="text/kendo-templ">@(Html.Kendo().Grid<CustomFieldDTO>( Model.Tasks.Where( f => f.ID == Guid.Parse( "#=ID#" ) ).FirstOrDefault().CustomFields ) .Name( "CustomTaskFields_#=ID#" ) .Columns( columns => { columns.Bound( q => q.PropertyID ); columns.Bound( q => q.FieldName ); columns.Bound( q => q.Value ); } ) .Pageable() .Sortable() .ToClientTemplate()) </script><select name="Phones[0].PhoneTypeId"> <option value="2">Mobile</option> <option value="3">Home</option> <option value="4">Work</option> <option value="5">Main</option> <option value="6">Fax</option></select><input name="Phones[0].Number" type="text">@foreach(var phone in Model.Phones){ Html.EditorFor(m => phone)}datasource => datasource.Ajax().ServerOperation(true) .Read(config => config.Url(myActionUrl)) .Group(config => config.Add(i => i.MyField))datasource => datasource.Ajax().ServerOperation(true) .Read(config => config.Url(myActionUrl)) .Group(config => config.Add(i => i.MyField))public class MyModel{ public String Name{get;set;} public String Description{get;set;} public List<Step> Steps{get;set;}}public class Step{ public int Id {get;set;} public String Name {get;set;} public String Description{get;set;}}@{ Html.Kendo().Grid<InEnumerable........>() .Name("IniParamGrid") .HtmlAttributes(new { style = "width: 100%;" }) .Events(events => events.DataBound("Grid_onRowDataBound")) .Events(events => events.Change("Grid_OnRowSelectUID")) .AutoBind(false) .Columns(col => { col.Bound("NP_PARAM_UID").Hidden(); col.Bound("PROCESS_GRP").Title("Process Group").HeaderHtmlAttributes(new { style = "text-align:center;" }); col.Bound("PARAM_NAME").Title("Parameter Name").HeaderHtmlAttributes(new { style = "text-align:center;" }); col.Bound("PARAM_VALUE").Title("Parameter Value").HeaderHtmlAttributes(new { style = "text-align:center;" }); col.Bound("EXTERNAL_ID").Title("Table Name").HeaderHtmlAttributes(new { style = "text-align:center;" }); col.Bound("EXTERNAL_FK").Title("Key Value").HeaderHtmlAttributes(new { style = "text-align:center;" }); col.Bound("DEL_FLG").Hidden(); }) .DataSource(dataBinding => { dataBinding.Ajax().Read(read => read.Action("SrchDataIniParam", "Admin", new { area = "Admin", strParam1 = ViewBag.Param1 })) .ServerOperation(false); }) .Resizable(resizing => resizing.Columns(true)) .Selectable() .Reorderable(reorder => reorder.Columns(true)) .Pageable() .Sortable() .Filterable() .Render();}