Hi,
A error was encounted when I installed Telerik.UI.for.Aspnet.Core (v2016.2.714) by NuGet in VS2015. The error detail is as the attached file.
Could you please help to check them and tell me how to install it correctly. Is there any special setting in VS2015 for the installation?
BTW, I can't submit support ticket through login of my account now (investigating cause), I want to get your help from here as suggest from your support team.
Regards,
Amstrong
Aug.8, 2016
Hello,
I have a grid with a Editor Template with one TextBox and a Upload Control (see Code)
in the Upload Control Client Event "Success" I want to set the filename to the TextBox Control - how to Access the TextBox Control in edit mode of the template from this Event?
@model string
@using Kendo.Mvc.UI
@Html.TextBoxFor(model => model, new { @class = "k-textbox" })
@(Html.Kendo()
.Upload()
.Multiple(false)
.Messages(m => m.HeaderStatusUploaded("Erfolgreich"))
.Messages(m => m.Select("Word Dokument hochladen..."))
//.HtmlAttributes(new { accept = "application/pdf" })
.Name("Wordvorlage1Upload")
.Async(a => a
.Save("Save", "Auszeichnungsart")
.AutoUpload(true)
)
.Events(events => events
.Upload("onUpload")
.Success("onUploadSuccess")
)
)
the Javascript Events
function
onUpload(e) {
//var grid = $("#grid").data("kendoGrid");
//grid.saveChanges();
e.data = { Auszeichnungsart_ID: $(
"#Auszeichnungsart_ID"
).val() };
}
function
onUploadSuccess(e) {
alert(e.files[0].name);
here I want to set the TextBox value of the edit template
var
grid = $(
"#grid"
).data(
"kendoGrid"
);
grid.dataSource.read();
}
Greetings!
I've implemented an EditorTemplate that uses Kedno.DropDownList for one of the model properties. Here is an example of it
1.
@(Html.Kendo().DropDownList()
2.
.Name(ViewData.ModelMetadata.AdditionalValues[
"id"
].ToString())
3.
.OptionLabel(
"not selected"
)
4.
.DataTextField(
"Name"
)
5.
.DataValueField(
"Id"
)
6.
.DataSource(ds => ds.Read(a => a.Action(
"GetAvailiableOrders"
,
"Orders"
)))
7.
.Filter(FilterType.Contains)
8.
I use this model to populate grid, like so
01.
@(
02.
Html.Kendo().Grid<CustomerViewModel>()
03.
.Name(
"customersGrid"
)
04.
.ToolBar(toolbar =>
05.
{
06.
if
(!Model.ReadOnly)
07.
{
08.
toolbar.Create();
09.
}
10.
})
11.
.Editable(e => e.Mode(GridEditMode.InLine).CreateAt(GridInsertRowPosition.Bottom))
12.
.Resizable(resize => resize.Columns(
true
))
13.
.Columns(c => {
14.
c.Bound(s => s.Order);
//EditorTemplate will be used here
15.
c.Bound(s => s.ConsumerName).Format(
"{0:dd.MM.yyyy}"
);
16.
c.Bound(s => s.OrderDate).Format(
"{0:dd.MM.yyyy}"
);
17.
if
(!Model.ReadOnly)
18.
{
19.
c.Command(command =>
20.
{
21.
command.Edit();
22.
command.Destroy();
23.
});
24.
}
25.
})
26.
.DataSource(d => d.Ajax().
27.
Model(m =>
28.
{
29.
m.Id(p => p.Id);
30.
m.Field(p => p.Id).DefaultValue(
default
(
long
));
31.
})
32.
.Read(a => a.Action(
"GetCostumers"
,
"Costumers"
))
33.
.Create(a => a.Action(
"CreateCostumer"
,
"Costumers"
))
34.
.Update(a => a.Action(
"UpdateCostumer"
,
"Costumers"
))
35.
.Destroy(a => a.Action(
"DeleteCostumer"
,
"Costumers"
))
36.
)
37.
)
I need some how to pass additional argument to the DataSource Read method,this parameter depends on other model property an is uiniqe for each grid row.
.DataSource(ds => ds.Read(a => a.Action(
"GetAvailiableOrders"
,
"Orders"
)))
//Need to pass additional argument here dependting on current row
Is there any way to implement this?
Hi,
I have a grid with some of the filters set. In the toolbar I have a new button going to a new page.
After inserting a new line in the grid I want to go back to the origional grid and set all the filters again.
Is this possible?
In the example in the attachment:
I have filtered on Project Number and Project Subnumber and pressed new which give me the bottom part of the image on a new webpage.
After pressing back or save I want to let the user going back to the old filtered information.
With kind regards,
Maurice Lucas
I have two grids with pageSize enabled which includes 'All' text to display all the items of the grid. There is a button in the form which when clicked will move items from one grid to other. The issue is when i select pageSize 'All' and click the button to move the item, the pageSize label changes to total count of the grid item. e.g. if grid1 has 50 items and if i move 1 item from grid1 to grid2, the pageSize text 'All' changes to '50' in grid1 after the move is performed.
I have created sample which has grid and delete button to remove one item from grid to mock this behavior. To replicate this behavior, select 'All' in the grid and click 'Delete' button. You should see '4' in the pageSize after the removal of the item from the grid.
http://dojo.telerik.com/eqIDe/2
Is there anyway to have 'All' text selected even after the removal of item from grid1?
Thanks.
Avinash
I'm struggling on how to set the color of a cell in the grid based on data. I see where this question has been asked a lot before - but I'm not seeing an answer that is understandable to me.
I am using ASP.NET MVC with a grid that has an AJAX datasource. The datasource returns a column that contains the color I want the cell to be.
The view's model contains the selection fields for the page. The grid is using a different class named: PlannedProjectList. There is a field in PlannedProjectList that contains the color of the cell.
@model LRFP.ViewModels.PlannedProjectSelection
@(Html.Kendo().Grid<LRFP.ViewModels.PlannedProjectList>()
I was able to set the color of the cell with this. But I don't want to use a model field. Because each row can be a different color. So I need to use a field from the data on the grid.
columns.Bound(c => c.PlannedProjectName).HtmlAttributes(new { style = "color: " + @Model.fieldColor + " ;" });
Is it possible to do what I'm asking? Or is there another way? If so, please show a detailed example. I'm a newbie - so the more detailed example the better.
Thanks for your help.
I'm trying to get around a bug with the Kendo Editor control in Internet Explorer (tested in IE11).
JS Fiddle here:
https://jsfiddle.net/L5tvccd9/
Repro steps:
1. Click inside one word (e.g. "nine")
2. Select All (Ctrl+A, but it also happens with example select all from docs: http://docs.telerik.com/kendo-ui/api/javascript/ui/editor#methods-selectRange )
3. Click inside a different word (e.g. "five")
4. Press return on the keyboard
Expected behaviour is to insert a break inside the second selected word, where the caret correctly appears (e.g. "five")
Actual behaviour is to insert a break inside the first selected word, where the caret was before select all (e.g. "nine")
This also breaks a lot of other features, like setting the style buttons to the correct state because it doesn't know where the caret is.
A second click in the same location, or using the keyboard cursor keys etc. correctly sets the caret position.
Also reproducible on the demo control:
http://demos.telerik.com/kendo-ui/editor/index
Is there any fix or workaround for this?
Hi,
I installed telerik.ui.for.aspnet.core(v2016.2.714) by NuGet in VS2015, but I got a error like the attached NuGet installation image and log. Could you please help to check it? Is there any special setting for the installation?
BTW, I can't submit my support ticket through login to my account (investigating), I want to get your support from here as suggest from your support team.
Regards,
Amstrong,
Aug.8, 2016
@(Html.Kendo().Chart()
.Name(Model.ChartName)
.Title(title => title
.Text(Model.ChartTitle)
.Align(ChartTextAlignment.Left)
)
.HtmlAttributes(new { @class = "dashboardChart" })
.Legend(legend => legend
.Visible(Model.LegendVisible)
.Position(ChartLegendPosition.Right)
)
.Series(series =>
{
series.Bar(new double[] { Model.AgedCount }).Name(Model.ChartAgedSeriesTitle).Color(myapp.Controllers.DashboardController.ChartSeries1Color);
series.Bar(new double[] { Model.UnAgedCount }).Name(Model.ChartUnAgedSeriesTitle).Color(myapp.Controllers.DashboardController.ChartSeries2Color);
})
.ValueAxis(axis => axis.Numeric()
.MinorUnit(1)
.MajorUnit(Model.ChartMaxValue <= 10 ? 1 : 5)
.Min(0)
.Max(Model.ChartMaxValue)
.MajorGridLines(lines => lines.Visible(true))
.MinorGridLines(lines => lines.Visible(true))
.Visible(true)
.Labels(labels => labels.Visible(true))
.MinorTicks(ticks => ticks.Visible(true))
)
.Tooltip(tooltip => tooltip
.Visible(true)
)
.Events(events => events
.SeriesClick("onSeriesClick")
)
)
I have a controller like so:
1.
public
async Task<ActionResult> ActionMethod([DataSourceRequest] DataSourceRequest request){...}
When I set a filter on the UI, the controller receives a request object populated with a filter object.
When I examine the traffic between the client and server I see a string for filter like this:
filter: FirstName~contains~'John'
I imagine there is a Model Binder some where that knows how to instantiate a filter object based on that string.
In this case, the results would be filtered to all entries with a First Name containing John.
My question is: Is there a way to pass a similar string to the Model Binder from another action?
For example,
From another action, I want to create a string like "FirstName~contains~'Mary'" and then Redirect to the "ActionMethod" action pasted above. When the "ActionMethod" is called, I would like the filter object to be constructed so that results would be filtered to all entries with a First Name containing Mary, instead of John. Is this possible?