Telerik Forums
UI for ASP.NET Core Forum
1 answer
158 views

Is it possible to add a combo box inside the grid with statically set items, meaning the combobox is not populated from a datasource but the items are set in code and then having it to preselected to the value in the grid when loading.

 

Thanks

zx10r
Top achievements
Rank 1
 answered on 12 Oct 2017
2 answers
71 views

Hello,

In Version 2017.3.913 the groupExpand Event not fires - all other events like the sort event fires...

robert

Robert Madrian
Top achievements
Rank 1
Veteran
Iron
 answered on 11 Oct 2017
7 answers
1.1K+ views

I have a checkbox in a grid:

columns.Bound(p => p.Display);

I also have the following editor template:

@model Boolean
@Html.Kendo().CheckBoxFor(m => m)

During editing the checkbox editor template does show, however the checked state is always false even when the underlying data is true.

Viktor Tachev
Telerik team
 answered on 05 Oct 2017
3 answers
84 views

Your search function inside the actual forum does not return any results.

See attached picture.

Plamen
Telerik team
 answered on 04 Oct 2017
1 answer
168 views

Hello,

I use the following approach to configure custom editing UI for the column: http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-columns.editor
(see also Code below)

this works for textcolumns but there is a Problem with kendoNumericTextBox, kendoTimePicker and kendoDatePicker.
If I click into the column the corresponding editor displays but after editing the wrong value is given back to the text field - for me it looks like there is a formatting problem with the german language...

in this Video https://www.screencast.com/t/GkXn5uS7SH2 you can see what's going on:

  • changing a time value of 12:33.00 results in "Thu Sep 28 2017 02:00:00 GMT+0200 (Mitteleuropäische Sommerzeit)"
  • changing a date value of 10.10.1999 results in "Wed Aug 19 1998 00:00:00 GMT+0200 (Mitteleuropäische Sommerzeit)"
  • in float/decimal value the decimal seperator is in german a comma not a dot - if I type 124,25 the result is 12425.00

How to set the Editors (kendoNumericTextBox, kendoTimePicker and kendoDatePicker) that they give the correct value back?

 

$(function () {
        var grid = $("#grdMitgliedprofile").data("kendoGrid");
        grid.columns[1].editor = function (container, options) {
            //-----------------------------------------
            //Eintrag_INT
            //-----------------------------------------
            if (options.model.Profilfeldtyp_ID == 1) {
                $("<input name='" + options.field + "' data-bind='value:" + options.field + "'/>").appendTo(container).kendoNumericTextBox({
                    format: "n",
                    decimals: 0
                });
            }
            //-----------------------------------------
            //Eintrag_FLOAT
            //-----------------------------------------
            else if (options.model.Profilfeldtyp_ID == 2) {
                $("<input data-bind='value:" + options.field + "'/>").appendTo(container).kendoNumericTextBox({
                    format: "n",
                    decimals: 2,
                    culture: "de-DE"
                });
            }
            //-----------------------------------------
            //Eintrag_BIT
            //-----------------------------------------
            else if (options.model.Profilfeldtyp_ID == 3) {
                //$("<input type='checkbox' data-bind='value:" + options.field + "' class='k-checkbox'/>").appendTo(container);
                $("<input data-bind='value:" + options.field + "'/>").appendTo(container).kendoDropDownList({
                    dataTextField: "text",
                    dataValueField: "value",
                    dataSource: [
                        { text: "JA", value: "JA" },
                        { text: "NEIN", value: "NEIN" },
                    ],
                });
 
            }
            //-----------------------------------------
            //Eintrag_VARCHAR
            //-----------------------------------------
            else if (options.model.Profilfeldtyp_ID == 4) {
                $("<textarea data-bind='value:" + options.field + "' class='k-textbox'/>").appendTo(container);
            }
            //-----------------------------------------
            //Eintrag_MONEY
            //-----------------------------------------
            else if (options.model.Profilfeldtyp_ID == 5) {
                $("<input data-bind='value:" + options.field + "'/>").appendTo(container).kendoNumericTextBox({
                    format: "c",
                    decimals: 2,
                    culture: "de-DE"
                });
            }
            //-----------------------------------------
            //Eintrag_TIME
            //-----------------------------------------
            else if (options.model.Profilfeldtyp_ID == 6) {
                $("<input data-bind='value:" + options.field + "'/>").appendTo(container).kendoTimePicker({
                    dateInput: true,
                    format: "HH:mm:ss",
                    parseFormats: ["HH:mm:ss"],
                    culture: "de-DE"
                });
            }
            //-----------------------------------------
            //Eintrag_DATETIME
            //-----------------------------------------
            else if (options.model.Profilfeldtyp_ID == 7) {
                $("<input data-bind='value:" + options.field + "'/>").appendTo(container).kendoDatePicker({
                    dateInput: true,
                    format: "dd.MM.yyyy",
                    culture: "de-DE"
                });
            }
            //-----------------------------------------
            //Eintrag_IMAGE
            //-----------------------------------------
            else if (options.model.Profilfeldtyp_ID == 8) {
                $("<input name='files' id='files' type='file'/>").appendTo(container).kendoUpload({
                    async: {
                        saveUrl: "save",
                        removeUrl: "remove",
                        autoUpload: true
                    }
                });
            }
            else {
                $("<textarea data-bind='value:" + options.field + "' class='k-textbox'/>").appendTo(container);
            }
        }
    })
Viktor Tachev
Telerik team
 answered on 03 Oct 2017
4 answers
869 views

Hello,

If I reload the tabstrip Content of the second tab with JavaScript with tabStrip.reload(item) in a partialview the Content is not replaced but
always appended...

@(Html.Kendo().TabStrip().Name("tabMitglieddokumenteEdit")
      .Animation(false).Items(tab =>
      {
          tab.Add().Text("Ansicht").Selected(true).Content(@<text><iframe style="position: absolute; height: calc(100% - 70px); width:100%; border: none" frameborder="0" src="@ViewBag.BCPHostUrl/DocumentViewer?source=Mitglieddokumente&id=@Model.Mitglied_ID&docid=@Model.Dokument_ID&w=100&h=100&sidepane=true&toolbar=true"></iframe></text>);
          tab.Add().Text("Dokumentdaten").LoadContentFrom("DokumentEdit_Read", "Mitglieddokumente", new { mitgliedid = @Model.Mitglied_ID, dokumentid = @Model.Dokument_ID });
      }))

maybe the reason is that the tabstrip is in a partial view but how to avoid that?

robert

Robert Madrian
Top achievements
Rank 1
Veteran
Iron
 answered on 02 Oct 2017
1 answer
197 views

In order to use Boostrap tooltips, I have the following on my page.

$(document).ready(function() {

        $('[data-toggle="tooltip"]').tooltip();
    });

 

However, when using a grid with hierarchy, the tooltips of the details grids are not rendered yet so the above method cannot work for them.
Are there some events that I can hook to when the details grids appear?

Viktor Tachev
Telerik team
 answered on 29 Sep 2017
1 answer
122 views

In my ASP.NET Core application I use a Razor template to create a Kendo grid based on one of my ViewModels.  The grid itself is set to use InCell editing and one of the columns generated corresponds to a string variable in the ViewModel.  When I clear the string cell in the grid and trigger an update to the grid's datasource I would expect the value of the string variable in the model of the datasource request to be an empty string.  However, when I stop at a break point in the controller and look at the properties of the model the string value has a value of null.

 

What would I need to do to pass along an empty string in the model to the controller action?

Ian
Top achievements
Rank 1
 answered on 27 Sep 2017
3 answers
389 views

I have a custom Edit button on Grid.

Upon clicking Edit, I get the selected grid data row:

function onUserOrgEdit(e) {

...

var data = this.dataItem($(e.currentTarget).closest("tr"));

...

}

Next, I need to refresh my window:

 var win = $("#createUserWindow").data("kendoWindow")

 win.refresh({
        url: "/Admin/EditOrgRole",
        data: data

});

 

I cannot JSON.stringify because wrong content-type is sent to controller action and asp.net core mvc not able to bind JSON correctly.  I get null values in controller action.  

What is the correct way to do this?

 

Thanks.

 

 

 

Dimitar
Telerik team
 answered on 26 Sep 2017
1 answer
110 views

I set MinLength on Autocomplete.

However when I click on the "clear" icon of the autocmplete box there are a few unexpected behaviors

- there is a call to the controller with empty text

- the dropdown remains open saying "no data found"

Ivan Danchev
Telerik team
 answered on 21 Sep 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?