Hi,
I want to add a specific class to the inputs in Inline editing .
How can I do it?
thanks
Hi,
at the moment I am converting the old Telerik MVC tool to Kendo MVC for one of our portals.
now I have an issue with a dynamic table, not always all fields are the same and I can't get it to work correctly.
my grid looks like this
@(Html.Kendo().Grid(Model.DefaultView)
.Name("Grid")
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("LoadData", "AutorisatieMatrix"))
.Update(read => read.Action("_SaveBatchEditing", "AutorisatieMatrix"))
.Model(model => model.Id("ProgramFunction"))
)
.Sortable()
.Editable(editing => editing.Mode(GridEditMode.InCell))
.ToolBar(commands =>
{
commands.Save();
})
.Columns(columns =>
{
columns.Bound("Id").Visible(false);
foreach (System.Data.DataColumn dcol in Model.Columns)
{
if (dcol.ColumnName != "Id")
{
if (dcol.ColumnName == "ProgramFunction")
columns.Bound("ProgramFunction")
.EditorTemplateName("_ReadOnlyValue")
.ClientTemplate("#=ProgramFunction#")
.Title("Programmafunctie");
else
{
columns.Bound(dcol.ColumnName)
.EditorTemplateName("_PermissionEditor")
.ClientTemplate(boo(this, "#=" + dcol.ColumnName + "#").ToHtmlString())
.Title(dcol.Caption)
;
}
}
}
})
where I go through all colums specified in the model.
and the header gets created as it should.
In the controller in the Index I create an empby DataTable so the Model knows which colums to use.
public
ActionResult Index()
{
var tbl = CreateNewDataTable();
var model = tbl;
return
View(tbl);
}
which seems to work fine.
Then In the loadData DataRequest I generate this same DataTable fill it, add a dynamic wrapper to include "Data" in the json
Convert is to Json and return the Content.
Hello,
I would like to use the ASP.NET MVC Kendo UI Grid to render a list of records that have a "Detail" button for each record (similar to this look: https://demos.telerik.com/aspnet-mvc/grid/custom-command).
I am currently using an AJAX-bound grid. I need to pass two values to the "Details" controller. Here is what I have so far:
.Columns( c=>
{
c.Bound(c => personId);
c.Bound(c => positionId);
// Want to use a "Details" button to pass personId and positionId to HomeController/Details/{personId}/{positionId}
c.Command( c => cmd.Custom("Details"))
})
.DataSource(d => d
.Ajax()
.Read(r => r.Action(
"GetPersons"
,
"Home"
))
)
However, the business logic in our application requires two values passed to the "Details" controller (see below).
1.
[HttpGet]
public
ActionResult Details(
int
personId,
int
positionId)
2.
{
3.
Person person = Person.GetPerson(personId, positionId, myConnection);
4.
return
View(person);
5.
}
HI
I met a problem about Grid Sortable :
Grid setOptions sortable = false clear header template UNEXPECTEDLY.
What's going on ?? Why header template lost ?
How to avoid this situation or
how to disable sortable temporary and header template will not be cleared.
Sample Code :
View
columns.Bound(c => c.Column1)
.HeaderTemplate
(
@<text>
<input type='number' class='k-textbox' onfocus="class1.focusAllDays({ element: this })" style='width: 50px; font-size: small;' />
</text>
)
.Width(280);
Javascript
class1 :
focusAllDays: function(e)
{
var grid = get your grid;
//
grid.setOptions({ sortable: false });
},
Best regards
Chris
With the recent release of 2018, I began the rework of several projects to also update them to the latest suite. I can report that this with this release I was actually able to perform a MVC Upgrade wizard without failures. That is a first for me.
My update strategy was as follows: First I ran the Report upgrade process. After it completes it reloaded the project and the Telerik product realized I still had a un-upgraded MVC project to upgrade. (That was a welcome change) Upon clicking the upgrade wizard it actually went off and upgraded things.
Upon completion of the process I was able to perform a clean/rebuild solution with zero errors. Using my normal testing process quickly confirmed everything met expectations. That was a very welcome change.
My only complaint is that the upgrade process, of the MVC, is very invisible to the developer. By this I mean the user has no visual indication that anything is happening except for the occasional busy cursor. The status bar occasionally has a message but it seems to be very sporadic. If you somehow improved this portion of your upgrade process things would be "perfect" in my mind.
NOTE: I did discover that you could monitor the contents of the recycle bin to see the progress of the upgrade process. The upgrade process delete files, which end up in the recycle bin, so as long as the number of files is growing you know something is working.
Special Note: Like most developers I also have one of those projects which are "from hell". It is a hybrid project that combines ASPX, MVC, and the HTML5 reporting tools. Collectively this project has never been upgrade capable via the wizards. They literally crashed each time I tried them. Given the hybrid nature, I always accepted is as something I caused myself by building the "beast". I can report that with this release (2018-1) the upgrade process actually worked. I ran the report upgrade wizard first. I then ran the MVC Upgrade process. I then ran the ASPX upgrade wizard. All three worked without error. None crashed. (A very welcome change) The end result compiled with errors as the ASPX process removed the MVC references as unnecessary. Upon re-adding that reference to the solution, everything compiled and tested with 100% accuracy. All tests ran without error. I was thrilled that this un-supported process actually worked!
Hello there,
I have a Kendo Grid with a lot of numerical data in it and I'd like to incorporate the Kendo range Slider into it so that users can adjust the sliders and this will filter the grid. Having read the documentation I'm not 100% sure how to do this. Can anyone help?
@(Html.Kendo().Grid(Model)
.Name("MyGrid")
.Columns(columns =>
{
columns.Bound(p => p.vessel_name).Title("Vessel");
columns.Bound(p => p.vessel_bhp).Title("Type");
columns.Bound(p => p.fixture_charterer).Title("Charterer");
columns.Bound(p => p.current_location).Title("Location");
columns.Bound(p => p.next_charterer_info).Title("Next Charter").Width(200);
columns.Bound(p => p.fixture_work).Title("Work");
columns.Bound(p => p.fixture_note).Title("Notes");
columns.Bound(p => p.vessel_status).Title("Status");
}
)
.Pageable()
.Scrollable()
.Sortable()
.Events(e => e.DataBound("OnDataBound"))
.DataSource(dataSource => dataSource
.Ajax()
.Model(model =>
{
model.Id(p => p.vessel_idx);
model.Field(p => p.vessel_idx).Editable(false);
})
.PageSize(50)
.Sort(sort => sort.Add("vessel_status").Ascending())
.ServerOperation(false)
.Events(events => events.Error("error_handler"))
.Create(update => update.Action("EditingInline_Create", "Grid"))
.Read(read => read.Action("EditingInline_Read", "Grid"))
.Update(update => update.Action("tbl_vessels", "Grid"))
.Destroy(update => update.Action("EditingInline_Destroy", "Grid"))
))
For example I'd like the ranger slider to filter the grid when people choose a range for vessel_bhp.
Any help is appreciated.
​
Hello,
First off, this is the best place I found to post this in, it's not MVC specific, I know.
There seems to be a slight bug in the Gantt chart when using Internet Explorer (I tried Firefox and Chrome, they didn't exhibit this behaviour). Atleast the MVC and jQuery UI versions seem to be affected. You can reproduce this by browsing to https://demos.telerik.com/aspnet-mvc/gantt or https://demos.telerik.com/kendo-ui/gantt/index with IE11 and then scrolling the Gantt chart to the bottom. If you click on any task in the right above "Integration testing", the left side of the Gantt (with ID, Title, Start Time, End Time) will properly scroll to the selected task. But if you click on "Integration testing" or a task below it, the left side will jump to the top, showing "ID 7 Software validation" and you have to nudge your scroll wheel for the left side to focus on the task you clicked on.
This happens on fully updated Windows 7 and IE11 with the version info in the attached picture.
Hi,
I am using Telerik ASP.NET MVC Extensions 2016.1.111.0. and Razor. The CheckBoxFor control behaves slightly illogical - in one case it shows a label, in another case it does not. See the attached screenshot.
Both parameters are booleans, the difference is that one of the has a DisplayName:
From the model.cs
public bool Dator { get; set; }
[DisplayName("Passerkort 07:30-17:00")]
public bool Passerkort { get; set; }
From the Index.cshtml
@Html.LabelFor(m => m.Dator)
@Html.Kendo().CheckBoxFor(m => m.Dator)
@Html.LabelFor(m => m.Passerkort)
@Html.Kendo().CheckBoxFor(m => m.Passerkort)
The parameter with the DisplayName specified will be displayed with a label attached to the CheckBoxFor, so to get rid of it I have to set .Label("") for that checkbox. Not a big deal, but I think maybe this was not the intention.
Best regards,
Henrik