Telerik Forums
Kendo UI for jQuery Forum
1 answer
21 views

Hi Team,

Is there any way to set the pattern color and pattern style of a cell before exporting to excel using jQuery?

Thanks,

Julian A

Nikolay
Telerik team
 answered on 16 May 2024
1 answer
23 views

I've got a kendo bar chart that I'm applying a font to but when I do, the labels are no longer aligned. using the default for the chart renders fine. How do I fix this? 

 

 

Neli
Telerik team
 answered on 16 May 2024
1 answer
21 views

Hello

I want to use the REST settings to do the updates. So I have a question while using saveChanges on grid
I want to each submit for created, updated, and destroyed, is there a way?

If there is a create row and an update row, I want to run only create.
After defining transport.create, transport.update as function and receiving only create data and doing e.success(data), update row exists and update function is also executed, and I wonder if I can return it here
If possible, create row should be in the saveChange state and update row should remain the same
Neli
Telerik team
 answered on 16 May 2024
0 answers
21 views

Hi,

Actually two questions.

(1)If a user imports their excell spreadsheet with formulas, styles and values, is it converted into JSON and viewable by access the sheets property of the Spreadsheet?  Does the spreadsheet control convert the excell properties into the sheets property (in JSON)? Is it converted like this:

Ideally, we would have one sheet with all the styles and formulas (really just references to other sheets with actual values) and the data would be referred to as a formula in the first sheet like this:

The value for cell A3 is in the formula, it is just referring to a cell in Sheet1; Sheet1!A1.

Is there any way to grab the multi sheet spreadsheet (sheets property I guess) as a JSON object and send it to an API? I see most of the examples have the sheet statically defined in the initialization of the of the component, then the data is bound from a separate dataSource.

I already did an experiment with swapping sheets, and this was somewhat successful, but the next step is to actually grab that sheets property from an API and somehow use the fromJSON() function to place the spreadsheet into the control, in addition to saving it off using JSON to an API.

I understand that it is easier to define the sheets statically when initializing the spreadsheet component, but I need a way to dynamically change the styles and save them off to an API.

Thanks,

George

George
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 15 May 2024
1 answer
17 views

Can someone tell me how I can align my last element to the right while the others stay to the left please? i am working with asp.net mvc core 8 

 

  @(Html.Kendo().Menu()
      .Name("Menu")
      .Items(items =>
      {
          items.Add().Text("Mis promociones").Action("Index", "Index", new { area = "" });
          items.Add().Text("Crear promoción").Action("Create", "Index", new { area = "" });
          items.Add().Text("Acerca de").Action("About", "Index", new { q = KitSecurity.EncryptQueryString("FolioName=789") });
          items.Add().Text("Contacto").Action("Contact", "Index", new { q = KitSecurity.EncryptQueryString("FOLIO_ID=456456") });
      items.Add().Text("Nombre de usuario").HtmlAttributes(new { @class = "ultimo-elemento" }).Items(subItems =>
      {
          subItems.Add().Text("Otros tramites").Url("https://localhost:44379");
          subItems.Add().Text("Cerrar Sesión").Action("CerrarSesion", "Index", new { area = "" });
      });

      })
  )
Anton Mironov
Telerik team
 answered on 13 May 2024
2 answers
20 views

Hello
I have a question while using saveChanges on grid
I want to generate sync for created, updated, and destroyed, is there a way?

If there is a create row and an update row, I want to run only create, is it possible?
After defining transport.create, transport.update as function and receiving only create data and doing e.success(data), update row exists and update function is also executed, and I wonder if I can return it here
If possible, create row should be in the saveChange state and update row should remain the same
Neli
Telerik team
 answered on 13 May 2024
2 answers
25 views

Hi,

 

Need to figure out the proper way to attach a new sheet. to the kendoSpreadsheet's option: sheets. I tried the below code:

 

 


$(document).ready(function () {
   //render and initialize kendoSpreadsheet:
   $("#spreadsheet").kendoSpreadsheet({
        columns: 20,
        rows: 200,
        toolbar: true,
        sheetsbar: true,
        sheets: mySheets,
        width: "100%"
   });
    
   //render and initialize kendoButton:
   $("#load-new-sheet-btn").kendoButton({
                icon: "forward",
                themeColor: "primary",
                click: swapSheets // want to render new set of sheets. Is this possible?
    });
 });

 //assign a different JavaScript object to the sheets: option parameter (this doesn't seem to refresh the spreadsheet component/control:
 function swapSheets() 
 {
     var currSpreadSheet = $("#spreadsheet").data("kendoSpreadsheet");

     console.log("BEFORE clearing sheets: currentSpreadSheet contents: ",  currSpreadSheet.options.sheets)
     currSpreadSheet.options.sheets = mySheetsTwo;

     console.log("AFTER clearing  sheets: currentSpreadSheet contents: ", currSpreadSheet.options.sheets);
     currSpreadSheet.refresh();
 }

 

You can see the whole code in action here in the Dojo:

 

Spreadsheet Demo Swapping Sheets | Kendo UI Dojo (telerik.com)

 

Also, my requirements want to load a stylized formatted sheet (ergo probably a sheet object), and X number of sheets with raw data…with a different dataSource associated to those raw data sheets.

 

The ultimate goal is to load data into a sheet object in from an API without rerendering the entire page or destroying the current spreadsheet component (and creating a new one).  Most importantly, or we can constrain the question to how to point sheets: to a new JSON sheet structure.

 

Here is a screen shot of what is happening:

 

 

It seems like I can re-assign the sheets object, but refreshing or binding the new sheets object is not being done successfully.

 

Hope this all makes sense,

George

Yordan
Telerik team
 answered on 10 May 2024
1 answer
19 views
Hello,

When focused in the HTML editor, I set the default font and font size and add a p tag to the outermost.
Then when I try to get the editor value with editor.value() it automatically gets a space ' ' is being added, but when I read it with editor.body.innerHTML there is no space.
This does not allow you to check whether the space was added by the user.

If from now on I get the editor value with editor.body.innerHTML, could problems occur?
Or what can I do so editor.value() doesn't automatically add spaces?

Thanks

 


<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({ tools: [
    "bold", "italic", "underline", "fontName", "fontSize"
  ]});
var editor = $("#editor").data("kendoEditor");
$(editor.body).focus(function (e) { editor.exec("fontName", { value: "Tahoma" }); editor.exec("fontSize", { value: "10pt" }); var content = editor.value(); if (content.indexOf('<p') !== 0) editor.value('<p>'+ content +'</p>'); console.log(editor.value()); console.log(editor.body.innerHTML); });
</script>


Result:
editor.value():  <p><span style="font-family:Tahoma;font-size:10pt;">&nbsp;</span></p>
editor.body.innerHTML:  <p><span style="font-family:Tahoma;font-size:10pt;"></span></p>
Yordan
Telerik team
 answered on 09 May 2024
1 answer
43 views

We are trying to Update kendo from 2020.3.1021 to 2024.1.319, we download the version and then we just copy the kendo.all.min.js, but when we start running the application the drop downs are all oversize, the arrow grouping for the grids is black, but the main thing is we use the kendoMobileSwitch, but every where we try to use we get the error "Uncaught TypeError: $(...).kendoMobileSwitch is not a function".

 

The questions is, do we need to add any additional js reference file to use this function ?

this is how all the drop downs were affected.

this is the arrow grouping image that is back

and the js error is when we try to call like this: $("#element").kendoMobileSwitch({ checked: true });, we get the error "Uncaught TypeError: $(...).kendoMobileSwitch is not a function"

 

Martin
Telerik team
 answered on 08 May 2024
1 answer
16 views

In the kendo multiselect, when an item is deselected, it does not take the focus from the previously selected item. For example, 
https://demos.telerik.com/kendo-ui/multiselect/keyboard-navigation

  1. In the demo, select small, medium, and large in that order. 
  2. Open the list and click on small to deselect it.
  3. Open the list and notice that large still has the focus.
  4. The expected behavior is that small would take the focus from large.

Using only the keyboard: 

  1. Press the down arrow to open the list.
  2. Using the down arrow and enter keys, select Small, medium, large, and xlarge in that order.
  3. Using the down arrow and enter keys, deselect medium
  4. Use the down arrow to open the dropdown.
  5. Observe that xlarge is focused. The expected behavior would be that medium is focused.
  6. Now select small and deselect large. Notice that small still has the focus.

 

Martin
Telerik team
 answered on 07 May 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Michael
Top achievements
Rank 2
Iron
Wilfred
Top achievements
Rank 1
Alexander
Top achievements
Rank 2
Iron
Iron
Matthew
Top achievements
Rank 1
Iron
ibra
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Michael
Top achievements
Rank 2
Iron
Wilfred
Top achievements
Rank 1
Alexander
Top achievements
Rank 2
Iron
Iron
Matthew
Top achievements
Rank 1
Iron
ibra
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?