Telerik Forums
UI for ASP.NET Core Forum
3 answers
488 views

Using Kendo MVC and bind to the grid in a typical way.  If the data set as a whole contains values in a column in a row not displaying in the current page the grouping feature does not see it.

How can you handle this?  Does this page size need to be adjusted in a client side OnGrouping event fires?

Any suggestions appreciated.

Tsvetomir
Telerik team
 answered on 12 Jun 2019
2 answers
181 views

I have an ASP.NET core app I've almost completed and I have an odd issue with a view (razor) that contains 2 Kendo grids. I have the culture set in _layout.cshtml using:

kendo.culture("en-GB");

 

At load of the view all currency columns in both grids correctly show the pound symbol. If I perform an action on the view that causes it to refresh or even if I manually refresh it, every currency value in the grid changes to display a dollar symbol instead. If I click on an item to edit it, which in both cases opens a popup, when I close the popup the grid I opened the popup from has resorted back to showing currency values with a pound symbol. The view itself also contains some kendo numerictextbox fields formatted as c0 or c2 and correctly show the pound symbol both before and after a refresh. Any ideas why the grids might be exhibiting this form of behaviour?

One other things that may be related, but shouldn't be, is I have a bootstrap modal defined in the view which shows a repeat of some of the fields from the main view along with another grid of related data.

PaulH
Top achievements
Rank 1
 answered on 11 Jun 2019
2 answers
1.0K+ views

How can I add a FontAwesome Icon to the Upload Button?  I'm using the tag helper for the upload control.

 

<kendo-upload drop-zone="drop-zone1" name="Input.RegulationDocument" multiple="false">
    <async auto-upload="true" />
    <validation allowed-extensions="@Model.AllowedExtensions" />
    <localization select="Upload PDF..." clear-selected-files="Remove PDF" />
</kendo-upload>
John
Top achievements
Rank 1
 answered on 11 Jun 2019
1 answer
947 views

Visual Studio 2017

.Net Core 2.2

Telerik 2019.2.514

I have a multiselect on a page that I am using a tag template to show the number of items selected out of the number of total items in the control.  This works fine except that I also have a button the user can click to select all of the items in the multiselect.  Once the user clicks the button another box appears with all of the items selected underneath the multiselect.  The multiselect does not change to show the number selected.  If I click the button numerous times, each time another box appears showing all of the selected items below the last one.  What am I doing wrong?

I have attached a screenshot and my code below.

Thanks, Rich

@using (Html.BeginForm(actionName: null, controllerName: null, method: FormMethod.Post, htmlAttributes: new { name = "myForm", id = "myForm", onkeydown = "return event.keyCode!=13" }))
{
<div class="text-center">        
            <label class="control-label FL">Select Unit(s)</label>
@(Html.Kendo().MultiSelect().Name("msUnit").BindTo(new SelectList(ViewBag.Unit, "Value", "Text")).TagMode(MultiSelectTagMode.Single).TagTemplateId("UnitTagTemplate").AutoClose(false).HtmlAttributes(new { @class = "CB FL W200" }))
@(Html.Kendo().Button().Name("btnSelectAllUnit").Content("Select All").HtmlAttributes(new { type = "button", style = "clear:both;float:left;border:solid;border-width:thin;background-color:lightgrey;height:25px;width:200px;" }).Events(events => events.Click("btnSelectAllUnitClick")))
</div>
}
<script id="UnitTagTemplate" type="text/x-kendo-template">
#:values.length# out of #:maxTotal#
</script>
<script>
function btnSelectAllUnitClick() {
var msUnit = $("#msUnit").kendoMultiSelect().data("kendoMultiSelect");
var values = $.map(msUnit.dataSource.data(), function (dataItem) {
return dataItem.value;
});
msUnit.value(values);
}
</script>

 

public IActionResult Index()
{
List<SelectListItem> units = new List<SelectListItem>()
{
new SelectListItem() {Text="0001", Value="0001"},
new SelectListItem() { Text="0001", Value="0002"},
new SelectListItem() { Text="0003", Value="0003"},
new SelectListItem() {Text="0004", Value="0004"},
new SelectListItem() { Text="0005", Value="0005"},
new SelectListItem() { Text="0006", Value="0006"},
new SelectListItem() {Text="0007", Value="0007"},
new SelectListItem() { Text="0008", Value="0008"},
new SelectListItem() { Text="0009", Value="0009"},
new SelectListItem() {Text="0010", Value="0010"},
new SelectListItem() { Text="0011", Value="0011"},
new SelectListItem() { Text="0012", Value="0012"},
};
ViewBag.Unit = units;
return View();
}

Petar
Telerik team
 answered on 11 Jun 2019
2 answers
142 views

Hi,

I couldn't find info about supported browsers for ASP.NET Core UI components. 

I have built asp.net core app with kendo-grid on it (bach editing, dropdowns). It works as expected with Chrome and Edge, but it doesn't render at all with IE11.

Any known issues, workarounds, documentation available?

Elleroch
Top achievements
Rank 1
 answered on 11 Jun 2019
2 answers
493 views

Hi,

https://demos.telerik.com/aspnet-mvc/grid/editing-custom

The above link discusses adding a dropdown in editable mode to select from a list.  What if I don't want the list to come from the model?  I'm trying to bind the dropdown to a ViewBag of names populated from an LDAP query (ie not the database).  What do I put in the ClientTemplate section?

Thanks,
Brian

Tsvetomir
Telerik team
 answered on 10 Jun 2019
8 answers
378 views

As far as I can tell binding is not an option with DateRangePicker.  Instead I believe you have to handle the change event and update your model from there.   However for the life of me I can't work out how to do this.  This is what I currently have:

@Html.HiddenFor(model => model.EarliestDeliveryDate)
@Html.HiddenFor(model => model.LatestDeliveryDate)
@(Html.Kendo().DateRangePicker()
    .Name("deliveryDate")
    .Range(r => r.Start(Model.EarliestDeliveryDate).End(Model.LatestDeliveryDate))
     .Messages(m => m.StartLabel("Earliest").EndLabel("Latest"))
    .Events(events => events.Change("onDeliveryDatesChange"))
)
 
<script type="text/javascript">
    function onDeliveryDatesChange() {
        var range = this.range();
        if (range.start && range.end) {
            var earliest = $('#EarliestDeliveryDate');
            var latest = $('#LatestDeliveryDate');
            earliest.val(range.start);
            latest.val(range.end);
        }
    }
</script>

 

The values are getting updated on the hidden fields but this is not getting reflected on the model.  I think this is because the format of the dates that are returned in range.start/end is wrong.  It could also be something completely different. Can you please give me an example of how to do this and I'd suggest also updating your documentation with the example too.

Also if Name is not set then rendering utterly fails and no good message is given.  This is not intuitive as other controls don't seem to need this value setting.

 

 

 

Viktor Tachev
Telerik team
 answered on 10 Jun 2019
5 answers
121 views

When editing a form with data, when I click the control to "EDIT" my saved date range selection it's opening on Todays date instead of my date range selection.

Any idea how to resolve this?

Viktor Tachev
Telerik team
 answered on 10 Jun 2019
3 answers
122 views

I have a form Razor in .NET Core that I have attached a Kendo Validator to.  When I submit the form validator.validate() is returning false but none of the inputs on the form are displaying a validation error.  How can I tell what validations are failing when validator.validate() returns false?

Razor Form 

<form id="editQuestionsForm" method="post">
    <input asp-for="Input.InspectionQuestionId" type="hidden" />
 
    <div class="row">
        <div class="col-md-12">
            <div class="form-group">
                <label asp-for="Input.InspectionSectionId"></label><br />
                <kendo-combobox name="inspectionSection" style="width: 500px;"
                                for="Input.InspectionSectionId"
                                placeholder="Select Section"
                                datatextfield="Text"
                                datavaluefield="Value"
                                bind-to="Model.InspectionSections">
                    <popup-animation>
                        <open duration="500" />
                        <close duration="500" />
                    </popup-animation>
                </kendo-combobox><br />
                <span asp-validation-for="Input.InspectionSectionId" class="text-danger"></span>
            </div>
        </div>
    </div>
 
    <div class="row">
        <div class="col-md-12">
            <div class="form-group">
                <label asp-for="Input.QuestionTextForForm"></label><br />
                <textarea asp-for="Input.QuestionTextForForm" class="form-control-textarea"></textarea><br />
                <span asp-validation-for="Input.QuestionTextForForm" class="text-danger"></span>
            </div>
        </div>
    </div>
 
</form>

 

JavaScript

var validator = $("#editQuestionsForm").kendoValidator().data("kendoValidator");
 
function validateSave() {
    if (validator.validate()) {
        $('#editQuestionsForm').submit();
    } else {
        bootstrapWarningsMessage("There was an error submitting the form.");
    }
    return true;
}

 

Misho
Telerik team
 answered on 07 Jun 2019
3 answers
137 views

(It's a trial version)

Impossible to display data.

Data are correctly supplied in my form (see DOM capture)

But there is an error :  L’objet ne gère pas la propriété ou la méthode « kendoGrid »

 JS are the same than in examples.

 

 

 

 

 

 

Tsvetomir
Telerik team
 answered on 06 Jun 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?