I have a column ("Sequence") that will contain an integer. Is there some way to bind the column ("Sequence")'s value to the order?
I'd like to use the Sortable control with a Grid so that when they drag the row it will change the Sequence column's value to reflect the order.
How can I go about doing this?
Hello!
I have this editor template: @Html.Kendo().TextBoxFor(model => model).Format("{0:n3}")
When I use this editor template to create a form, the numbers get formatted according to the format string with three decimal digits.
But when I use the editor template for a grid column (in-cell / batch editing), the format option is ignored. Instead, numbers are shown exactly the way they are delivered from the server.
However, grid client templates work perfectly:
columnTest.Format("{0:n3}"); // or
columnTest.ClientTemplate("#: kendo.toString('columnTest', 'n3') #");
How can I configure the numeric formatting of the editor templates?
Best regards,
Kaan
So we've read the docs; done all the appropriate searching; yet cannot keep the listview from repeating calls to the create service.
According to the docs the listview datasource expects the item that was added to be returned. Here is our server side controller method:
[HttpPost]
public
ActionResult CreateMultiSelectItem([DataSourceRequest] DataSourceRequest request,
long
questionId, SurveyQuestionMultiSelectItem item)
{
if
(item !=
null
&& ModelState.IsValid)
{
var vm =
new
SurveyQuestionMultiSelectViewModel(_surveyQuestionService.GetById(questionId));
vm.SurveyQuestionDetails.Items.Add(item);
vm.UpdateRootSurveyQuestion(_surveyQuestionService);
}
return
Json(
new
[] {item}.ToDataSourceResult(request, ModelState));
}
as you can see we are returning the exact item being created.
The Datasource setup for the listview is as such:
<div
class
=
"demo-section k-content wide"
>
<a
class
=
"k-button k-button-icontext k-add-button"
href=
"#"
><span
class
=
"k-icon k-add"
></span>Add
new
record</a>
@(Html.Kendo().ListView<LMI.QMIMS.Business.SurveyQuestions.SurveyQuestionMultiSelectItem>()
.Name(
"listView"
)
.TagName(
"div"
)
.ClientTemplateId(
"template"
)
.DataSource(source=>source
.Model(model=>
{
model.Id(p=>p.Id);
model.Field(p => p.Id).DefaultValue(Guid.NewGuid());
}
)
.Create(create=>create.Action(
"CreateMultiSelectItem"
,
"SurveyQuestion"
,
new
{ questionId = Model.SurveyQuestionId }))
.Read(read=>read.Action(
"ReadMultiSelectItem"
,
"SurveyQuestion"
,
new
{ questionId = Model.SurveyQuestionId}))
.Update(update=>update.Action(
"UpdateMultiSelectItem"
,
"SurveyQuestion"
,
new
{ questionId = Model.SurveyQuestionId }))
.Destroy(destroy=>destroy.Action(
"DeleteMultiSelectItem"
,
"SurveyQuestion"
,
new
{ questionId = Model.SurveyQuestionId } ))
.Events(events=>events.Error(
"onDataSourceError"
))
)
.Pageable()
.Editable()
)
</div>
So am I missing something totally obvious? I do this sort of behavior in the Grid control all day long without this issue.
-Scott Singleton
Hello,
I want to have the "k-hierarchy-cell" smaller then the Standard (see Pictures) - how to do this?
robert
As you can see in the attached image, there's a weird issue where the "editable" part of the cell doesn't align with the part of a row or cell that's highlighted.
So clicking on a cell to edit the value requires that you click on the "upper" part of the cell, and is very confusing and unusable.
I have a pretty default configuration:
@Html.Kendo().Spreadsheet().Name("TestSpreadsheet")
Thoughts?
Thanks!
We are currently updating an application to use MVC 6 with the current set of beta release from Telerik with the MVC wrappers.We are running into one sticking point that the demos do not address and I cannot find anywhere in the docs where it does either.
On out pages we have multiple grids with custom toolbars deployed using the common syntax
.ToolBar(toolbar =>
{
toolbar.Template(
@<text>
//Bunch of code remove for brevity
</text>);
})
However, this throws an error and upon further inspection the toolbar.Template method doesn't exist. We did find ClientTemplate but we cannot seem to get this to work. How are we supposed to implement a custom toolbar now? We saw that there may be a way in which we could specify a ViewComponent but it was not very clear.
If you could provide us an example this would go a long way to us getting this out the door.. So far all of the other controls seem to be working no problem.
Thanks,
AJ
​