Hello,
We plan to use kendo UI bar chart for our MVC project to present our business logic. My question is how to handle long text on CategoryField? Is there any way to make label on different direction like brown colored lines on the bottom in below image? Thanks.
I am using Telerik UI for ASP.NET MVC R2 2021 SP1 (2021.2.616) in VB.net, Visual Studio 2019
I have added a FileManager to an MVC view following the code in the Basic Usage demo (https://demos.telerik.com/aspnet-mvc/filemanager) and everything is working correctly, except when I try to implement the code for the New Folder button (Which fires the Create command on the DataSource).
@Html.Kendo().FileManager().Name(Model.ControllerName & "_FileManager").DataSource(Sub(ds)
ds.Read(Sub(r)
r.Type(HttpVerbs.Post).Action("Read", Model.ControllerName)
End Sub)
ds.Create(Sub(c)
c.Type(HttpVerbs.Post).Action("Create", Model.ControllerName)
End Sub)
ds.Update(Sub(u)
u.Type(HttpVerbs.Post).Action("Update", Model.ControllerName)
End Sub)
End Sub).Upload(Sub(u)
u.Validation(Sub(v)
v.AllowedExtensions(Model.AllowedFileExtensions)
End Sub)
End Sub).UploadUrl("Upload", Model.ControllerName).Toolbar(Sub(t)
t.Items(Sub(i)
i.Add("createFolder")
i.Add("upload")
i.Add("sortDirection")
i.Add("sortField")
i.Add("spacer")
i.Add("search")
End Sub)
End Sub).InitialView("grid").ContextMenu(Sub(c)
c.Items(Sub(i)
i.Add("download").Command(Model.ControllerName & "DownloadCommand").Text("Download").SpriteCssClass("k-icon k-i-download")
End Sub)
End Sub)On the demo page, if you have the developer tab open to the Network, when clicking the New Folder button you can see the request that is sent to the url defined in the Create endpoint and it contains the target path as well as the data for a FileManagerEntry object for the New Folder in the Form Data:
When I click the button in my FileManager view I can see the Form Data only includes the target property but none of the others:
Here is the code for the Create function in my Controller (it's almost identical to the demo code):
Public Function Create(ByVal target As String, ByVal entry As FileManagerEntry) As ActionResult
Dim newEntry As FileManagerEntry
If String.IsNullOrEmpty(entry.Path) Then
newEntry = CreateNewFolder(target, entry)
End If
Return Json(VirtualizePath(newEntry))
End FunctionI have not been able to figure out why the FileManager in my view is not returning the same data to the controller that the demo one does.
Any help would be greatly appreciated.
I have a grid, I have added custom validations on multiple columns. It's working as expected. But there is one issue, I am not able to edit other cells if there is any validation error on the cell, So first I need to fix the error for this cell then only I am allowed to edit other cells. But I want that it should show the validation error in the tooltip and as well as to edit other cells.
I have attached the tooltip message in the question.
columns.Bound(config => config.X).Title("X").HeaderHtmlAttributes(new { @class = "grid-headercustom" }).
ClientTemplate("#if(data.X == 1)" + "{#<span>Y</span>#}" + "else{#<span>N</span>#}#").
HtmlAttributes(new { @class = "grid-rowcustom" }).HtmlAttributes(new { style = "font-size:12px" }).Filterable(ftb => ftb.Enabled(false));
$.extend(true, kendo.ui.validator, {
rules: {
RateV: function (input, params) {
if (input.is("[name='X']")) {
var grid = $("#mygrid").data("kendoGrid");
var row = input.closest("tr");
var dataItem = grid.dataItem(row);
if (dataItem.X == true && dataItem.Y <= 0) {
input.attr("data-RateV-msg", "X must be greater than zero when the Y is ticked");
return false;
}
}
return true;
}
},
messages: {
RateV: function (input) {
// return the message text
return input.attr("data-val-X");
}
}
});
})(jQuery, kendo);
I have tried to return true also but it doesn't show the error then.
input.attr("data-RateV-msg", "X must be greater than zero when the Y is ticked");
return true;I have a case where i need to dynamically clone the switch control and use it.
Im able to clone the switch but the script still refers to the original control .
Tried changing the id and name properties but still not able to achieve it .
Can anyone let me know how to do it .(FYI im not using mobileswitch)
Thanks in advance.

Hi,
I have a business requirement to be displayed 100+ bar charts with lines on one page itself while hitting the page.
Can you please help to do that dynamically? I'm very much new to this Kendo UI control.
--
Thanks
Ramesh

I want the sum of two columns to be added to another column in the kendo grid. Now it is showing that NaN when I use ClientTemplate whereas in the case of ClientGroupColumnTemplate shows the correct result. In my case, I want the result in another column instead of a group column any help?
.Columns(c =>
{ c.Bound(p => p.field1).Title("F1");
c.Bound(p => p.field2).Title("F2");
c.Bound(p => p.Total).Title("Total").ClientTemplate("#=calculate(data)#");
})
<script>
function calculate(data) {
field1 + p.field2;
return result;
</script>

Hello,
Could someone provide sample code for export Grid data to excel? below is the requirement:
1. This is MVC project
2. Kendo Grid with many pages in the View.
3. button located in the view but not located in the toolbar section of the Grid.
4. When click button, all Grid data (not just View data) should export to excel file.
Thanks.

Hello,
I try to get dataSource from my MVC project but got syntax error. Could someone tell me what's wrong? Thanks.
Action method on MyController:
public JsonResult Position_Read()
{
var entity = new PositionViewModel
{
POS_ID = "10000",
POS_TYPE="INTER",
CREATE_DT = DateTime.Now
};
return Json(entity);
}
JavaScript in View:
<script>
function GetServerSourceData() {
var ds = new kendo.data.DataSource({
type: "odata",
transport: {
read: "/MySite/MyController/Position_Read"
},
schema: {
model: {
fields: {
POS_ID: { type: "string" },
POS_TYPE: { type: "string" }
CREATE_DT: { type: "date" },
}
}
}
});
return ds;
}
</script>

I have added custom validation on the grid for multiple columns. It's working as expected. The only problem I am facing is that the tooltip position is not pointing to the current cell, it is pointing to different cells in the same row for all columns. How can I fix it?
columns.Bound(config => config.X).Title("X").HeaderHtmlAttributes(new { @class = "grid-headercustom" }).
ClientTemplate("#if(data.X == 1)" + "{#<span>Y</span>#}" + "else{#<span>N</span>#}#").
HtmlAttributes(new { @class = "grid-rowcustom" }).HtmlAttributes(new { style = "font-size:12px" }).Filterable(ftb => ftb.Enabled(false));$.extend(true, kendo.ui.validator, {
rules: {
RateV: function (input, params) {
if (input.is("[name='X']")) {
var grid = $("#grid-pricefeedconfiguration").data("kendoGrid");
var row = input.closest("tr");
var dataItem = grid.dataItem(row);
if (dataItem.X == true && dataItem.Y <= 0) {
input.attr("data-RateV-msg", "X must be greater than zero when the Y is ticked");
return false;
}
}
return true;
}
},
messages: {
RateV: function (input) {
// return the message text
return input.attr("data-val-X");
}
}
});
})(jQuery, kendo);