Telerik Forums
Kendo UI for jQuery Forum
1 answer
9 views
Hi,

The width of the dropdown list which appears when you click on the Kendo MultiSelect control is the same width as the multiselect control itself.
Is there a way to increase the dropdown width so items which are longer can be displayed on the same line?

P.S: i had implemented virtualization for multiselect
Dimitar
Telerik team
 answered on 16 Sep 2021
1 answer
10 views

Hi team,

This dojo to illustrate the problem: https://dojo.telerik.com/inukEneV

In this dojo, i want to export selected rows to excel with exportSelectedToExcel(true). Rows are selected by clicking checkboxes.

What I experience:

- Column headers are duplicated in excel file, one for each row when selecting row with checkboxes. When selecting rows by dragging the mouse (not clicking the checkbox), it seems to work. (screenshot 1)

- Many times, when selecting rows by clicking checkbox mixed with dragging mouse to select, I can get an excel file with rows that were not selected! (screenshot2) Quite strange.

Please advise,

Best regards,

Laurent.

 

Nikolay
Telerik team
 answered on 15 Sep 2021
0 answers
9 views
Hello I have some nested column headers and locked columns.. The ones on the locked side aren't expanding 100% ondataload.. see screenshot... when I move the column they expand down..

m
Top achievements
Rank 1
Iron
Iron
 asked on 14 Sep 2021
1 answer
7 views

How to leave the NumericTextBox format in Brazilian Portuguese? I already left it that way but it doesn't work, returns the error:

Error in /turbo_modules/@telerik/kendo-intl@2.3.0/dist/npm/main.js (633:12)
NoLocale: Missing locale info for 'pt-br'

 


<template>
  <div class="example-wrapper row">
    <div class="col-xs-12 col-sm-6 example-col">
      <localization :language="'pt-br'">
        <intl :locale="'pt-br'">
          <p>NumericTextBox</p>
          <numerictextbox :default-value="123.45" :format="'c'">
          </numerictextbox>
          <p>Slider</p>
          <slider
            :buttons="true"
            :step="1"
            :default-value="7"
            :min="1"
            :max="10"
          >
          </slider>
        </intl>
      </localization>
    </div>
  </div>
</template>
<script>
import {
  IntlProvider,
  load,
  loadMessages,
  LocalizationProvider
} from "@progress/kendo-vue-intl";
import { NumericTextBox, Slider } from "@progress/kendo-vue-inputs";

import likelySubtags from "cldr-core/supplemental/likelySubtags.json";
import currencyData from "cldr-core/supplemental/currencyData.json";
import esNumbers from "cldr-numbers-full/main/es/numbers.json";
import esCurrencies from "cldr-numbers-full/main/es/currencies.json";

load(likelySubtags, currencyData, esNumbers, esCurrencies);

import esMessages from "./es.json";
loadMessages(esMessages, "es");

export default {
  components: {
    numerictextbox: NumericTextBox,
    slider: Slider,
    intl: IntlProvider,
    localization: LocalizationProvider
  }
};
</script>

Petar
Telerik team
 answered on 14 Sep 2021
1 answer
12 views

How to add upload widget inside form widget.

Like the combobox in the sample of forms. I need to put upload file inside the form.

 

thanks.

Martin
Telerik team
 answered on 14 Sep 2021
1 answer
7 views

Hi all,

Is it possible to disable en hide the treeview in filemanger?

Greetings Maxime

Martin
Telerik team
 answered on 14 Sep 2021
1 answer
18 views

Hi,

in Kendo Spreadsheet cell, when it's in editing, the backspace button doesn't work to cancel cell content;

any idea to resolve it?

 

Patrick
Telerik team
 answered on 13 Sep 2021
0 answers
10 views

Hello I am coming from Kendo for Core. I am trying to get data from the database but im not sure where im going wrong.

Here is my controller action and the call from the webpage.

   public IActionResult GetRoles()
        {
            var Roles = _context.AspNetRoles.ToList();

            return Json(Roles);
        }

  $("#grid").kendoGrid({
                dataSource: {
                    type: "json",
                    transport: {
                        read: '../Admin/GetRoles'
                    },
                    pageSize: 20
                },

This works locally but when i publish to the server it cannot find the method.  I looked at the service they have posted but im not sure what i would need to do.

 

local does give an error but the data shows

kendo.all.js:2178 Unknown DataSource transport type 'json'.
Verify that registration scripts for this type are included after Kendo UI on the page.
Kerry
Top achievements
Rank 1
 updated question on 12 Sep 2021
1 answer
12 views

my cshtml file

  @(Html.Kendo().Spreadsheet()
            .Name("spreadsheet").HtmlAttributes(new { style = "width:100%;" })

        )

<script> $(document).ready( function () { var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet"); $.ajax({ type: "POST", url: '@Url.Action("GetFileFromDetails", "Spreadsheets")', contentType: "application/json; charset=utf-8", data: { data: myData }, dataType: "json", success: function (recData) { //alert(recData); spreadsheet.fromJSON(recData.response); }, error: function (ex) { alert(ex); } }); }); </script>

my controller


  [HttpPost]
        public ActionResult GetFileFromDetails()
        {
           
var workbook = Workbook.Load(file.InputStream, Path.GetExtension(file.FileName));
            return Content(workbook.ToJson(), Telerik.Web.Spreadsheet.MimeTypes.JSON);
        }
this method returns same value as shown in upload example still this doesn't load spreadsheet
  [HttpPost]
        public ActionResult Upload(HttpPostedFileBase file)
        {            
            var workbook = Workbook.Load(file.InputStream, Path.GetExtension(file.FileName));
            return Content(workbook.ToJson(), Telerik.Web.Spreadsheet.MimeTypes.JSON);
        }
while using upload sample it works fine. 
Hardik
Top achievements
Rank 1
Iron
 answered on 10 Sep 2021
1 answer
18 views

Support

 I am new to Telerik Grid.  This code I put together from a couple of the sites examples

to show "proof of concept" for a newly assigned project.  The display of the grid works fine

if I remove the "TRANSPORT section of the datasource.  The popup edit will save to the cached data but

will not call the update action as specified.  As you see the data is generated as a list and converted

to JSON on entry to the view.  Any assistance would be greatly appreciated.  Thank you.

 

Bill Lawler 

 

Below is my controller, model, and View snippets 

 

MY CONTROLLER

    public class TankTagItemVM
    {
        public string Tank { get; set; }
        public string Level_Tag { get; set; }
        public string Material_Tag { get; set; }
        public string Temperature_Tag { get; set; }
        public string Water_Level_Tag { get; set; }
        public string Gross_Pumpable_Tag { get; set; }
        public string Gross_Heel_Tag { get; set; }
        public string Gross_Volume_Tag { get; set; }
        public string Gross_Max_Tag { get; set; }
        public string Net_Volume_Tag { get; set; }
        public string Mvmt_Level_Tag { get; set; }
        public string Mvmt_Gross_Pumpable_Tag { get; set; }
        public string Mvmt_Gross_Heel_Tag { get; set; }
        public string Mvmt_Gross_Volume_Tag { get; set; }
        public string Mvmt_Gross_Max_Tag { get; set; }
        public string Mvmt_Net_Volume_Tag { get; set; }
    } 

 

 

 

MY CONTROLLER

        public ActionResult GetTankTags([DataSourceRequest] DataSourceRequest request)
        {

            DateTime startDate = DateTime.Parse("2021-01-17");
            var page = request.Page;
            var pagesize = request.PageSize;

            string conn = ConfigurationManager.ConnectionStrings["PMRCConnectionString"].ConnectionString;
            SqlConnection sqcon = new SqlConnection(conn);
            SqlCommand cmd = new SqlCommand();
            SqlDataAdapter sd = new SqlDataAdapter(cmd);
            DataTable dt = new DataTable();
            cmd.Connection = sqcon;
            cmd.CommandText = "dmi.tml_get_tank_tag_items_sp";
            cmd.CommandType = System.Data.CommandType.StoredProcedure;
            sd.SelectCommand.Parameters.Add("@pDtToday", SqlDbType.DateTime).Value = startDate;
            sqcon.Open();
            sd.Fill(dt);
            sqcon.Close();
            List<TankTagItemVM> TanksTagSummary = new List<TankTagItemVM>();
            foreach (DataRow dr in dt.Rows)
            {
                TankTagItemVM st = new TankTagItemVM();
                st.Tank = dr["Tank"].ToString();
                st.Level_Tag = dr["Level_Tag"].ToString();
                st.Material_Tag = dr["Material_Tag"].ToString();
                st.Temperature_Tag = dr["Temperature_Tag"].ToString();
                st.Water_Level_Tag = dr["Water_Level_Tag"].ToString();
                st.Gross_Pumpable_Tag = dr["Gross_Pumpable_Tag"].ToString();
                st.Gross_Heel_Tag = dr["Gross_Heel_Tag"].ToString();
                st.Gross_Volume_Tag = dr["Gross_Volume_Tag"].ToString();
                st.Gross_Max_Tag = dr["Gross_Max_Tag"].ToString();
                st.Net_Volume_Tag = dr["Net_Volume_Tag"].ToString();
                st.Mvmt_Level_Tag = dr["Mvmt_Level_Tag"].ToString();
                st.Mvmt_Gross_Pumpable_Tag = dr["Mvmt_Gross_Pumpable_Tag"].ToString();
                st.Mvmt_Gross_Heel_Tag = dr["Mvmt_Gross_Heel_Tag"].ToString();
                st.Mvmt_Gross_Volume_Tag = dr["Mvmt_Gross_Volume_Tag"].ToString();
                st.Mvmt_Gross_Max_Tag = dr["Mvmt_Gross_Max_Tag"].ToString();
                st.Mvmt_Net_Volume_Tag = dr["Mvmt_Net_Volume_Tag"].ToString();
                TanksTagSummary.Add(st);
          }
          return View(TanksTagSummary);
        }

 

 

MY CSHTML 

@model List<WebApplication5.Models.TankTagItemVM>
@{
    ViewBag.Title = "GetTankTags";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Tank Tags List</h2>

<div id="grid"></div>
<script>
    $(document).ready(function () {
        var model =@{@Html.Raw(Json.Encode(Model))};
        var crudServiceBaseUrl = "https://localhost:44387/TanksList";

        dataSource = new kendo.data.DataSource({
            data: model,
            pageSize: 20,
            schema: {
                model: {
                    id: "Tank",
                    fields: {
                        Tank: { type: "string" },
                        Level_Tag: { type: "string" },
                        Material_Tag: { type: "string" },
                        Temperature_Tag: { type: "string" },
                        Water_Level_Tag: { type: "string" },
                        Gross_Pumpable_Tag: { type: "string" },
                        Gross_Heel_Tag: { type: "string" },
                        Gross_Volume_Tag: { type: "string" },
                        Gross_Max_Tag: { type: "string" },
                        Net_Volume_Tag: { type: "string" },
                        Mvmt_Level_Tag: { type: "string" },
                        Mvmt_Gross_Pumpable_Tag: { type: "string" },
                        Mvmt_Gross_Heel_Tag: { type: "string" },
                        Mvmt_Gross_Volume_Tag: { type: "string" },
                        Mvmt_Gross_Max_Tag: { type: "string" },
                        Mvmt_Net_Volume_Tag: { type: "string" },
                    }
                }
            },
            transport: {
                read: {
                    url: '@Url.Action("GetTankTags", "TanksList")',
                    dataType: 'json'
                },
                update: {
                    url: '@Url.Action("GetTankTags_Update", "TanksList")',
                    dataType: 'json',
                    type: 'POST'
                },
                parameterMap: function (options, operation) {
                    if (operation !== "read" && options.models) {
                        return { models: kendo.stringify(options.models) };
                    }
                }
            }
        });

        $('#grid').kendoGrid({
            dataSource: dataSource,
            selectable: "single",
            sortable : {
                mode :"single",
                allowUnsort : "false"
            },
            height: 550,
            pageable : {
                refresh : false,
                pageSizes : true,
                buttonCount:10
            },
            columns: [
                { field: "Tank", title: "Tank", width: "70px" },
                { field: "Level_Tag", title: "Level", width: "70px" },
                { field: "Material_Tag", title: "Material", width: "100px" },
                { field: "Temperature_Tag", title: "Liquid Temp", width: "100px" },
                {
                    title: "Midnight Cut-off Tags", attributes: { style: "text-align: center" },
                    columns: [
                        { field: "Water_Level_Tag", title: "Water Level", width: "100px" },
                        { field: "Gross_Pumpable_Tag", title: "Gross Pumpable", width: "100px" },
                        { field: "Gross_Heel_Tag", title: "Gross Heel", width: "100px" },
                        { field: "Gross_Volume_Tag", title: "Gross Volume", width: "100px" },
                        { field: "Gross_Max_Tag", title: "Gross Max", width: "100px" },
                        { field: "Net_Volume_Tag", title: "Net Volume", width: "100px" }
                    ]
                },
                {
                    title: "Pumper Log Tags",
                    columns: [
                        { field: "Mvmt_Level_Tag", title: "Level", width: "70px" },
                        { field: "Mvmt_Gross_Pumpable_Tag", title: "Gross Pumpable", width: "100px" },
                        { field: "Mvmt_Gross_Heel_Tag", title: "Gross Heel", width: "100px" },
                        { field: "Mvmt_Gross_Volume_Tag", title: "Gross Volume", width: "100px" },
                        { field: "Mvmt_Gross_Max_Tag", title: "Gross Max", width: "100px" },
                        { field: "Mvmt_Net_Volume_Tag", title: "Net Volume", width: "100px" }
                    ]
                },
                { command: ["edit", "destroy"], title: "&nbsp;", width: "250px" }
            ],
            editable: "popup"
        });
Neli
Telerik team
 answered on 10 Sep 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Matthias
Top achievements
Rank 5
Bronze
Bronze
Iron
Psyduck
Top achievements
Rank 4
Bronze
Bronze
Iron
Liu
Top achievements
Rank 1
Iron
Alex
Top achievements
Rank 1
Veteran
Iron
Iron
George C.
Top achievements
Rank 2
Iron
Veteran
Top users last month
Matthias
Top achievements
Rank 5
Bronze
Bronze
Iron
Psyduck
Top achievements
Rank 4
Bronze
Bronze
Iron
Liu
Top achievements
Rank 1
Iron
Alex
Top achievements
Rank 1
Veteran
Iron
Iron
George C.
Top achievements
Rank 2
Iron
Veteran