Hi
I have issue with Kendo treeview expanding in my MVC project. I try to expand treeview node (which have children nodes) at same time when I select it. The code went through in .js file without error. but node didn't expand. Could any one tell me what properly be wrong? below are piece of code. Thanks.
var
selectedNode = $("#treeView").data('kendoTreeView').dataItem(e.node);
// selectedNode have correct data after this.
var
treeView = $("#treeView").data('kendoTreeView');
treeView
.expand(selectedNode); //Code went through without error
Currently evaluating the Upload control, I ideally want only a simple upload button to select local files and do everyting else on my own through the client API.
Especially the gray div (k-widget k-upload k-header) around the button bothers me.
My question:
Is it possible to tell the Upload control to simply display the core upload button and omit everything else, even after the user has selected files?
Is there a way to get the responsive behavior for the menu to change to a hamburger menu when the screen size is small? I saw this older post and was wonder if anything has changed.
https://www.telerik.com/forums/menu-and-bootstrap
The behavior would be similar to http://getbootstrap.com/examples/navbar/
Thanks
I've a grid with ajax binding and exports to excel/PDF fine when dealing with less than a thousand records. But when I want to export bigger quantities the grid doesn't do anything at all. I even put breakpoints in both export actions with no luck.
What can I do to solve this issue?
This is my grid:
<script src="~/Scripts/lib/jszip.min.js" type="text/javascript"></script>
<script src="~/Scripts/lib/pako.js" type="text/javascript"></script>
<script src="~/Scripts/KendoUI/ExportPDFCustomizing.js" type="text/javascript"></script>
@(Html.Kendo().Grid(Model)
.Name("OperacionesDelDia")
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("OperacionesDelDia_Read", "Operaciones")
.Data("PasarParametros"))
.Aggregates(a =>
{
a.Add(p => p.oper_monto).Sum();
a.Add(p => p.oper_mont_neg).Sum();
})
.PageSize(30)
)
.Columns(columns =>
{
columns.Bound(foo => foo.esto_codigo).Title(Global.Estado);
columns.Bound(foo => foo.oper_numero)
.Title(Global.Numero)
.ClientTemplate("<a onclick=\"showDetails('#= oper_numero #')\" href='\\#'>#= oper_numero #</a>");
columns.Bound(foo => foo.merc_codigo).Title(Global.Mercado);
columns.Bound(foo => foo.oper_nrobol).Title(Global.Boleto);
columns.Bound(foo => foo.clas_codigo).Title(Global.Clase);
columns.Bound(foo => foo.tope_codigo).Title(Global.TipoOperacion);
columns.Bound(foo => foo.ClieNombre).Title(Global.RazonSocial);
columns.Bound(foo => foo.espe_codigo).Title(Global.Especie);
columns.Bound(foo => foo.cupo_numero).Title(Global.Cupon).Hidden(true);
columns.Bound(foo => foo.clie_alias).Title(Global.ClienteAlias).Hidden(true);
columns.Bound(foo => foo.oper_forigen).Title(Global.FechaOrigen).Format("{0:dd/MM/yyyy}");
columns.Bound(foo => foo.oper_plazo).Title(Global.Plazo).Hidden(true);
columns.Bound(foo => foo.oper_fvence).Title(Global.FechaVence).Format("{0:dd/MM/yyyy}");
columns.Bound(foo => foo.oper_monto).Title(Global.Capital).Format("{0:N}").ClientFooterTemplate("#= kendo.format('{0:N}', sum)#");
columns.Bound(foo => foo.espe_codcot).Title(Global.EspecieNeg).Hidden(true);
columns.Bound(foo => foo.oper_tna).Title(Global.Tna);
columns.Bound(foo => foo.oper_interes).Title(Global.Interes).Hidden(true);
columns.Bound(foo => foo.oper_mont_neg).Title(Global.Monto).Format("{0:N}").ClientFooterTemplate("#= kendo.format('{0:N}', sum)#");
columns.Bound(foo => foo.clie_cuit).Title(Global.Cuit).Hidden(true);
columns.Bound(foo => foo.TipoNroDoc).Title(Global.TipoNroDoc).Hidden(true);
columns.Bound(foo => foo.usua_codigo).Title(Global.Usuario);
columns.Bound(foo => foo.usua_alta).Title(Global.UsuarioAlta).Hidden(true);
columns.Bound(foo => foo.oper_falta).Title(Global.FechaAlta).Format("{0:dd/MM/yyyy}").Hidden(true);
columns.Bound(foo => foo.liquidada).Title(Global.Liquidado).Hidden(true);
columns.Bound(foo => foo.usua_surperv).Title(Global.UsuarioSuperv).Hidden(true);
columns.Bound(foo => foo.oper_nombre).Title(Global.Operador).Hidden(true);
columns.Bound(foo => foo.oper_observ).Title(Global.Observaciones).Hidden(true);
columns.Bound(foo => foo.espedesc).Title(Global.EspecieDesc).Hidden(true);
columns.Bound(foo => foo.orden_numero).Title(Global.Orden).Hidden(true);
})
.Excel(excel => excel
.FileName("Reporte.xlsx")
.Filterable(true)
.AllPages(true)
.ProxyURL(Url.Action("Excel_Export_Save", "Operaciones"))
)
.Pdf(pdf => pdf
.PaperSize("A4")
.AllPages()
.Landscape()
.FileName("Reporte.pdf")
.ProxyURL(Url.Action("Pdf_Export_Save", "Operaciones"))
)
.Events(e => e.PdfExport("ExportarPDF"))
.ToolBar(t => t.Excel().Text("Exportar a Excel"))
.ToolBar(t => t.Pdf().Text("Exportar a PDF"))
.ColumnMenu()
.Pageable()
.Sortable()
.Selectable()
.Scrollable(s => s.Height(320))
.Groupable()
.Resizable(resize => resize.Columns(true))
.Reorderable(reorder => reorder.Columns(true))
.Filterable(ftb => ftb.Mode(GridFilterMode.Menu))
)
<script type="text/javascript">
function PasarParametros() {
var dpFechaDesde = $("#fechaDesde").data("kendoDatePicker");
var valorFechaDesde = dpFechaDesde.element[0].value;
var dpFechaHasta = $("#fechaHasta").data("kendoDatePicker");
var valorFechaHasta = dpFechaHasta.element[0].value;
var ddlLiquidadas = $("#liquidadas").data("kendoDropDownList");
var valorLiquidadas = ddlLiquidadas.element[0].value
return {
fechaDesde: valorFechaDesde,
fechaHasta: valorFechaHasta,
liquidadas: valorLiquidadas
};
}
</script>
And these are my actions:
[HttpPost]
public ActionResult Excel_Export_Save(string contentType, string base64, string fileName)
{
var fileContents = Convert.FromBase64String(base64);
return File(fileContents, contentType, fileName);
}
[HttpPost]
public ActionResult Pdf_Export_Save(string contentType, string base64, string fileName)
{
var fileContents = Convert.FromBase64String(base64);
return File(fileContents, contentType, fileName);
}
Thank you very much
When working with the .Group property, there is an option for changing the sort.
.Group(group => group.Add(p => p.fieldname))
it would appear that you should be able to set the System.ComponentModel.ListSortDirection
This is not working, and the documentation is abysmal.
Instead of the group sorting asc, I need it to sort desc.
In my view page, I'm using Kendo.MVC.UI and Html Helpers. But it does not show me the MultiColumnCombBox. This command below gives me an error saying MultiComboBox method is not found.These are the JS files that I've included in my view.
@(Html.Kendo().MultiColumnComboBox() .Name("customers") .DataTextField("ContactName") .DataValueField("CustomerID")........
<script src="https://kendo.cdn.telerik.com/2018.3.1017/js/jquery.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2018.3.1017/js/kendo.all.min.js"></script>
Can you let me know what is missing?
Hello. I am trying to implement a dropdownlist and I need some help. I have 2 simple tables (Employee and Department). Each employee belongs to a department and a department can have multiple employees. I am using EF database first approach. EF generated the 2 classes (Employee.cs and Department.cs) and each class has a reference to the other.
This is my controller actionmethod
public ActionResult Kendo()
{
db.Configuration.LazyLoadingEnabled = false;
var departments = db.Departments.ToList();
ViewData["departments"] = departments;
var employees = db.Employees.Include(e => e.Department).ToList();
return View(employees);
}
The view is
@(Html.Kendo().Grid(Model)
.Name("Grid")
.Columns(c =>
{
c.Bound(e => e.EmployeeId);
c.Bound(e => e.FirstName);
c.Bound(e => e.LastName);
c.Bound(e => e.Gender);
c.Bound(e => e.City);
c.Bound(e => e.Department.DepartmentName);
//columns.ForeignKey(e => e.DepartmentId, Model.Select(e => e.Department), "DepartmentId", "DepartmentName");
//columns.Bound(e => e.Department.DepartmentName).EditorTemplateName("DepartmentEditor").Title("Department").Width(250);
//columns.Command(command => { command.Edit(); command.Destroy(); }).Width(200);
})
//.DataSource(d => d
// .Ajax()
// .ServerOperation(false)
//)
.Pageable() //Enable the paging.
.Sortable() //Enable the sorting.
.Filterable()
.Scrollable()
)
The EditorTemplate
@(Html.Kendo().DropDownList()
.Name("Department")
.DataValueField("DepartmentId")
.DataTextField("DepartmentName")
.BindTo((IEnumerable)ViewData["departments"])
)
Issues I am having:
Thanks.
Hi,
I have a grid that has one dynamically sized column to maximize space (it contains the most data). As the browser window is resized to be smaller and that column shrinks, it eventually disappears. All of the other columns are auto-sized to contents.
Is there a way to set a minimum width for the column so that when I resize the browser window, it will freeze the width of that column when it reaches a certain threshold and scroll instead?
(I am using the MVC suite of controls.)
Thanks!
Brian
Hello,
I am trying the Kendo Slider for ASP MVC and want to set the inital values programatically. To do this I have this line of code:
@Html.Kendo.RangeSlider.Name(
"rangesliderStadtverkehr"
).Min(0.6).Max(5.5).SmallStep(0.1).LargeStep(1).Values(
CDbl
(0.6),
CDbl
(5.5))
But when the site is rendered the selectionStart-value is set to 6 and the selectionEnd-value is set to 55. It seems that the decimal-point ist forgotten.
An additional problem is a linebreak at the end of the renderd slider. For both problems I have added an attachment.
Can you help me to fix the problems? Thank you.
Best regards, Martin
Hi Guys
Long time user of your products..I am considering re subscribing to get access to the new chat component. So far my tests using the Trial license is going pretty well
One issue I have hit is that in my solution, the user needs to reload the chat window ( placing on hold and returning to it). I need to reload the historic conversation , which is all good.. apart from the time stamps ( the ones that are shown when you select the text). This is always set to the time I recreate the chat, but I want to use the actual date and time stamp that message was given. ( the original timestamp)
Is there anyway I can set the timestamp to be displayed when using the RenderMessage method?. ( I see none, but I know how clever you guys are!)
Many thanks
Rob