Telerik Forums
Kendo UI for jQuery Forum
1 answer
719 views

Hello All,

When I specify width columns in my css, the pdf grid export does not break page correctly. It breaks page in the middle of a row...

Here is a sample from Alex (https://dojo.telerik.com/@bubblemaster/UQOcIs/2). Please add code my css to specify width columns and export the pdf:

.k-pdf-export colgroup > col:nth-child(1) {
    width: 80px !important;
}
.k-pdf-export colgroup > col:nth-child(2) {
    width: 55px !important;
}

You will see that it does not break page when it should.

 

I can't understand why.

 

Any idea ?

Thank you

Tsvetomir
Telerik team
 answered on 04 Jun 2019
1 answer
491 views
Hi, we are using the "btoa" method to generate field name in some of our objects.

We have no problems with these attributes until we make them "observable".
The "btoa" algorithm can return some special characters, "+", "=" and "/".

Even if it looks strange, that is valid javascript / JSON property names.
Javascript can handle this.  

And observable too, until we use getters / setters.

Take a look at this dojo with a sample that explains everything.

var obj = new kendo.data.observableObject({});
var field = "field/";
obj[field] = "test"; // works
obj.set(field, "test"); // crash
value = obj[field]; // works
value = obj.get(field); // crash

Thank you
Georgi
Telerik team
 answered on 03 Jun 2019
1 answer
124 views
We seem to be getting a few network errors where tile.openstreetmap.org (a,b,c, subdomains) are sometimes unavailable.   What would be the best way to detect this and then display a message to the user that "Map is not Available"?
Georgi
Telerik team
 answered on 03 Jun 2019
10 answers
669 views

I have the custom edit template working great for my scheduler.  For updates of events, or creation of new events it works great after following all your examples.I am hung up on one item however.  In my custom template i want to show a user name.  This user name is populated in the model that is sent to the scheduler event.  This works fine for when you modify events.  however if i double click to create a brand new event, the model fields that are passed to the custom editor template are all empty.  I can add an event to the scheduler to trap the "Add" event (which is what is called when double clicking to add a BRAND NEW event).  But how do i send a filled-in model to that editor template?

FYI, using mvc5 with razor pages:

Here is the scheduler view page:

@(Html.Kendo().Scheduler<Sp.Models.TaskViewModel>()
            .Name("scheduler")
            .StartTime(new DateTime(2016, 10, 1, 7, 00, 00))
            .Height(600)
            .Editable( e => e.TemplateName( "SchedulerEditTemplate" ) )
            .Views(views =>
            {
               views.DayView();
               views.WeekView(weekView => weekView.Selected(true));
               views.MonthView();
               views.AgendaView();
            })
            .Timezone("Etc/UTC")
            .Events( e =>
            {
               e.Add( "OnAddEvent" );
            })
            .DataSource(d => d
               .Model(m =>
               {
                  m.Id(f => f.TaskID);
                  m.Field(f => f.OwnerID);
                  m.RecurrenceId(f => f.RecurrenceID);
                  m.Field( f => f.IsAllDay );
                  m.Field( f => f.OwnerName );                   
               })
               .Read(    "Tasks_Read",    "Scheduler" )
               .Create(  "Tasks_Create",  "Scheduler" )
               .Destroy( "Tasks_Destroy", "Scheduler" )
               .Update(  "Tasks_Update",  "Scheduler" )
            )
)
  
<script>
   function OnAddEvent() {
      alert("add");
   }
</script>

 

HERE is 

custom template:

@model Sp.Models.TaskViewModel
 
<div class="k-edit-label"><label>Event Creator</label></div>
<div class="k-edit-field" >
   <span data-bind="text: OwnerName"></span>
</div>

 

/* rest is left out for brevity but its stock code for event template */

 

 

Veselin Tsvetanov
Telerik team
 answered on 03 Jun 2019
8 answers
309 views

This has been driving me crazy for weeks now. I came up with a work around but didnt consider how my work around (or any) would actually work with what i'm doing.

Either way, i'm pretty sure this is an actual bug with Kendo UI as i've only just figured out it's also present in your example documentation: https://docs.telerik.com/kendo-ui/controls/scheduling/scheduler/how-to/binding/sync-with-batch

You can recreate the bug by doing the following actions:

1. Open an event

2. Cancel event

3. Reopen event

4. Select date with date picker

5. TypeError: i.wrap is not a function at line 27

Veselin Tsvetanov
Telerik team
 answered on 31 May 2019
3 answers
764 views

Hi 

I have a treeview with remote binding like this

http://demos.telerik.com/kendo-ui/treeview/remote-data-binding

how to filter data when data is bound remotely? 

in this example i want to give "Robert King" as input and want to open all nodes until "Robert King"

 

2. ) If i provide input "Laura Callahan" is there a way i can stop opening "Steven Buchanan" node ? 

i am getting haschildren value from my database, if hasChildren is false i should not open that node

Please help with above two tasks.

 

Thanks

Plamen
Telerik team
 answered on 30 May 2019
10 answers
1.5K+ views

I have a grid that requires being pre-filtered. I use the following code successfully to do that:

 

filter: {
            filters: [{ field: "ProductName", operator: "contains", value: "Chai" }]}

 

This pre-filters the grid and when I access the filter menu I can see all the filter options but they are not in alphabetical order. I then use the filterMenuInit function to sort selected columns in ascending order.

 

filterMenuInit: function(e) {
              if (e.field === "UnitPrice" || e.field === "UnitsInStock" || e.field === "ProductName") {
                var filterMultiCheck = this.thead.find("[data-field=" + e.field + "]").data("kendoFilterMultiCheck");
                filterMultiCheck.container.empty();
                filterMultiCheck.checkSource.sort({field: e.field, dir: "asc"});
                filterMultiCheck.checkSource.data(filterMultiCheck.checkSource.view().toJSON());
                filterMultiCheck.createCheckBoxes();
              }
            }

This does work but only shows the filter values that are contained with the pre-filtered data columns, the rest of the filter values are gone (the pre-filter seems to apply to the filter values as well)

 

If you check the following Dojo example, you'll see that the filter applies successfully, ProductName = Chai, but if you then click on the filter button, you'll see that you can only filter for values contained within the Chai record and nothing else.

 

http://dojo.telerik.com/edowIMax

 

Any help is greatly appreciated, I'm sure it's most likely a placing issue but I've tried multiple ways to do this now including columnInitMenu all to no avail!

Alex Hajigeorgieva
Telerik team
 answered on 30 May 2019
1 answer
760 views

How to disable auto open when clicking the kendo multiselect auto complete box.It may be open when i start typing and should not ever open on click.

Code for multiselect-

$("#select").kendoMultiSelect({ dataTextField: "text", dataValueField: "value", dataSource: data, dataBound: onDataBound, filtering: onFiltering, deselect: onDeselect, select: onSelect, change: onChange, close: onClose, open: onOpen });

 

 

 

Petar
Telerik team
 answered on 29 May 2019
1 answer
580 views

I am facing 2 problems in kendo multiselect dropdown for php-

1)How to sort the items which come in dropdown by alphabet.Even if we type a letter,the dropdown items should begin with that letter and show in a alphabetically sorted order.

 

2)when we click in kendo multiselect,dropdownlist should not appear below.It should appear only if we type a letter and the corresponding letter matches should appear.

Kendo multiselect code-

$(\"#selects\").kendoMultiSelect({
                placeholder: \"Key Skills\",
                dataTextField: 'text',
                dataValueField: 'value',
                dataSource: data,
                dataBound: onDataBound,
                filtering: onFiltering,
                deselect: onDeselect,
                select: onSelect,
                change: onChange,
                close: onClose,
                open: onOpen,
                filter: \"startswith\"

How to solve these issues?

Petar
Telerik team
 answered on 29 May 2019
3 answers
497 views

First, it would be really helpful with a good example of using Grids in a TabStrip, I am sure many more than I want to do that.

 

I have a TabStrip with 2 tabs each containing one grid. When I load up the View containing the TabStrip it seems like both Grids tries to load its data, but only one of them (on the first/active tab) actually manage to display some data. Here is my TabStrip:

 

<div id="forecast">
    @(Html.Kendo().TabStrip()
          .Name("BackOfficeTabStrip")
          .Items(tabstrip =>
          {
              tabstrip.Add().Text("Bostadstyper")
                  .Selected(true)
                  .Content(@<text> @Html.Action("Index", "AccommodationType")</text>);


              tabstrip.Add().Text("Civilstatus")
                  .Selected(false)
                  .Content(@<text> @Html.Action("Index", "CivilStatusType")</text>);
          })
          )
</div>​

 

And my "subviews" are setup as MVC partials and work fine on their own.

 

Are Partials the preferred way of handling "subviews" in a TabStrip? What are the settings available to control loading of contents?

Amber
Top achievements
Rank 1
 answered on 28 May 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?