I use sass theme builder as my kendo style.
I only include the generated css from theme builder, I don't include any common or bootstrap css.
When I tried to use text editor on my form, what I got is (see the attached file 1) while in the theme builder the text editor is nice (see the attached file 2).
As you can see in the toolbar,
On my side it renders as <a> tag
On theme builder it renders as <button> tag.
Does anyone know why?
I used the instructions from here: https://docs.telerik.com/aspnet-mvc/html-helpers/data-management/grid/faq#how-can-i-use-action-links
... and the code below works just fine, however this creates a GET. How can change it to create a POST?
Here is my code:
columns.Bound(c => c.InvoiceAmount)
.Format("{0:C}")
.Width(100)
.Title("Invoiced")
.HtmlAttributes(new { @style = "text-align:right;color:blue;" })
.ClientGroupHeaderColumnTemplate("#= kendo.format('{0:C}',sum)#")
.ClientTemplate("<
a
href
=
'/PurchaseInvoice/Index?StatusIDFrom=1&StatusIDTo=250&ProjectID=#=ProjectID#&SupplierID=#=SupplierID#&DateFrom=#= kendo.toString(DateFrom,'
yyyy-MM-dd') #&DateTo=#= kendo.toString(DateTo,'yyyy-MM-dd') #'>#= kendo.format('{0:C}',InvoiceAmount)#</
a
>")
.ClientFooterTemplate("<
div
style
=
'text-align:right;color:blue;'
><
a
href
=
'" + Url.Action("Index", "PurchaseInvoice?ProjectID=#=projectID#")+"'
>#= kendo.format('{0:C}',sum)#</
a
></
div
>");
... the ClientTemplate creates a GET, I need a POST.
Note: I want to display the InvoicedAmount as a link to a POST.
Thanks
this is my modal body .. it's a form to create a new product that should write a name and associate it to a catogory
@model mySolution.Models.
@using (Html.BeginForm("Product_Add", "", FormMethod.Post))
{
@Html.AntiForgeryToken()
<div class="form-horizontal" id="newProduct">
<div id="validation-summary">
</div>
<div class="form-group">
<div class="form-row">
@Html.LabelFor(model => model.ProductName, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.ProductName, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.ProductName, "", new { @class = "text-danger" })
</div>
</div>
</div>
<div class="form-group">
<div class="form-row">
@Html.LabelFor(model => model.ProductCategory, htmlAttributes: new { @class = "control-label col-md-2" })
@(Html.Kendo().DropDownList()
.Name("categoriesDropDownList")
.DataTextField("CategoryName")
.DataValueField("CategoryID")
.DataSource(source =>
{
source.Custom()
.ServerFiltering(true)
.Type("aspnetmvc-ajax")
.Transport(transport =>
{
transport.Read("Category_Read", "Category");
})
.Schema(schema =>
{
schema.Data("Data")
.Total("Total");
});
})
)
</div>
</div>
</div>
<br />
<div class="form-group">
<div class="form-row">
<div class="col-md-12" style="text-align: right;">
<input type="submit" value="Enregister" class="mr-1 mb-1 btn btn-primary" />
@Html.ActionLink("Annuler", "ProductList", "Products", null, new { @class = "mr-1 mb-1 btn btn-secondary" })
</div>
</div>
</div>
}
Product and Category are two differents table..I get the list of categories but when i want to submit the save of a new product ..i didn't get the correct value of categoryID and after submit :in the table of Product..it take the correct Name of Product filled and 0 as value of CategoryID
in the controller side i have an action method Product_Add(ProductModel model) that call a service to execute the save..
how can I get the correct CategoryID selected , pass it (Category_CategoryID_PK = Product_CategoryID_FK) and save it ? any propositions?
Thanks!
I used the examples I could find:
<
input
type
=
"submit"
value
=
"Export to Excel"
name
=
"export"
id
=
"excel"
formmethod
=
"post"
class
=
"btn-secondary searchBtn px-5"
/>
and then:
<
script
type
=
"text/javascript"
>
$(function(){
kendo.ui.progress.messages = {
loading: "Processing..."
};
function displayLoading(target) {
var element = $(target);
kendo.ui.progress(element, true);
this.form.submit(function(){
kendo.ui.progress(element, false);
});
}
$("#excel").click(function(){
displayLoading(document.body);
});
});
</
script
>
The problem is that the controller's action returns a file:
public ActionResult Index(...)
{
...
return File(renderedBytes, mimeType, fileName); // This is an Excel file.
}
it looks to me that the
kendo.ui.progress(element, false);
is never triggered, therefore the progress overlay stays displayed (and the form is disabled) even after the Excel file is returned to the browser.
How can I make the overlay disapear once the Excel file has been returned?
Thanks.
Hi,
i have few integer columns in grid.
I want to display sum of column in footer of the grid.
i tried several ways but could not success.
I am using the Fluent API of the Telerik UI for Asp.Net MVC to build a form that has an Editor as one of it's elements, bound to a backing property in my model. I want my view to act as both the edit and display page for my model, so I want to disable the Editor when in display mode, but I cannot find a method to do so, and my attempts to change the contenteditable attribute to false have failed. y research lead me to work arounds in other version of Kendo-UI that haven't worked for me. Below is a snippet of my form with the Editor that I am looking to disable.
@(Html
.Kendo()
.Form<
InformationModel
>()
.Name("formInformation")
.HtmlAttributes(new { action="Add", method="POST"})
.Items(i => {
i.Add()
.Field(f => f.Description)
.Editor(e => e.Editor().HtmlAttributes(new { contenteditable = false }))
.Label(l => l.Text(SharedHtmlLocalizer["Description"].Value))
.InputHtmlAttributes(new { data_val_required = string.Format(Localizer["TheField_Name_IsRequired"], Localizer["Description"]), contenteditable=ViewBag.IsEdit });
}
)
)
How can I disable this Editor through the Fluent API? If that isn't possible, how can I disable it via javascript (specifically jQuery)?
Hello,
I remember there are some simple sites to let user modify some setting for kendo widget to see the modified results. I could not find them now. Can someone tell me where to look those practice sites - for example : simple kendo grid setting for MVC.
Thanks.
Hi,
Not having much luck using this PivotGrid seems it very undeveloped.
How can i sort the Columns from A to Z?
Thanks,
Lee.
There is a Grid with dynamic columns.The number of columns is not fixed(10-20col). there is horizontal and vertical scrolling
Html structure:
<
div
id
=
"root"
>
<
div
id
=
"grid-param"
> ...html contet...</
div
>
<
div
id
=
"grid"
> </
div
>
</
div
>
Export:
var
grid = $(
"#grid"
).data(
"kendoGrid"
);
var
progress = $.Deferred();
kendo.drawing.drawDOM($(
"#grid-param"
))
.then(
function
(header) {
grid._drawPDF(progress)
.then(
function
(foolGrid) {
foolGrid.children.push(header);
return
kendo.drawing.exportPDF(foolGrid, { margin: { left:
'2cm'
, top:
'8cm'
, right:
'2cm'
, bottom:
'2cm'
}, allPages:
true
});})
.done(
function
(dataURI) {
kendo.saveAs({
dataURI: dataURI,
fileName: name });
progress.resolve();});
});
As a result, a document is formed in which content is superimposed on each other (pic in attach). The top of the Grid displays content from div #grid-param.
how to group content correctly so that there is no overlap?)
kedto ver. 2018.1.221.545
Hi,
When am trying to load json data to kendo grid am getting above error in chrome console.
here is my json
[{"EMPNUMBER":57,"EMPNAME":"Seldon, Brenda","COMPANY":"IT","PROJECTNAME":"Bullhorn P1 Integ","CHARGEDESC":"BizTalk Testing"},{"EMPNUMBER":70,"EMPNAME":"DiSanto, Lisa","COMPANY":"IT","PROJECTNAME":"Employee Time-off Tasks","CHARGEDESC":"Vacation (Personal Holiday) Regular Kelly Only"},{"EMPNUMBER":70,"EMPNAME":"DiSanto, Lisa","COMPANY":"IT","PROJECTNAME":"2020 Production Support","CHARGEDESC":"Production Support"}]
here is my design code
@( Html.Kendo().Grid<TimeControlReportEnhancements.Models.TimeControlGrid>()
.Name("client")
.Columns(columns =>
{
columns.Bound(p => p.EMPNAME);
columns.Bound(p => p.COMPANY).Width(150);
columns.Bound(p => p.PROJECTNAME).Width(150);
columns.Bound(p => p.CHARGEDESC).Width(150);
columns.Command(command => { command.Edit(); command.Destroy(); }).Width(200);
})
.ToolBar(toolbar =>
{
toolbar.Create();
toolbar.Save();
})
.HtmlAttributes(new { style = "height: 550px;" })
.Editable(editable => editable.Mode(GridEditMode.InCell))
.Filterable()
.Pageable()
.Navigatable()
.Sortable()
.Scrollable(scr => scr.Height(550))
.DataSource(dataSource => dataSource
.Ajax()
.Batch(true)
.PageSize(20)
.ServerOperation(false)
.Events(events => events.Error("error_handler"))
.Model(model => model.Id(p => p.EMPNUMBER))
.Create("Filter_Multi_Editing_Create", "Home")
.Read("GetAllEmployees", "Home")
.Update("Filter_Multi_Editing_Update", "Home")
.Destroy("Filter_Multi_Editing_Destroy", "Home")
)
)