Telerik Forums
Kendo UI for jQuery Forum
11 answers
207 views

Hello

i have a grid which is created from a html table

inside grid configuration i added "columnMenu: true" to have option to show and hide columns . 

what i want is to have an option to remove one column from column menu . there is an option for grids which are created from dataSource. i could found its documentation here . simple you just pass menu:false for desired column and it will not be inside column menu.
in the documentation of creating grid from html ( here ) i could found data-menu attribute for th tag but when i use . it is not working.

demo

is there any one who cam help me?

<!DOCTYPE html>
<html>
<head>
    <style>html { font-size: 14px; font-family: Arial, Helvetica, sans-serif; }</style>
    <title></title>
 
     
     
     
     
 
</head>
<body>
    <div id="example">
    <table id="grid">
        <colgroup>
            <col />
            <col />
            <col style="width:110px" />
            <col style="width:120px" />
            <col style="width:130px" />
        </colgroup>
        <thead>
            <tr>
                <th data-field="make" data-menu="false">Car Make</th>
                <th data-field="model" data-menu="false">Car Model</th>
                <th data-field="year">Year</th>
                <th data-field="category">Category</th>
                <th data-field="airconditioner">Air Conditioner</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Volvo</td>
                <td>S60</td>
                <td>2010</td>
                <td>Saloon</td>
                <td>Yes</td>
            </tr>
            <tr>
                <td>Audi</td>
                <td>A4</td>
                <td>2002</td>
                <td>Saloon</td>
                <td>Yes</td>
            </tr>
            <tr>
                <td>BMW</td>
                <td>535d</td>
                <td>2006</td>
                <td>Saloon</td>
                <td>Yes</td>
            </tr>
        </tbody>
    </table>
 
    <script>
        $(document).ready(function() {
            $("#grid").kendoGrid({
                height: 550,
                sortable: true,
                columnMenu: true,
            });
        });
    </script>
</div>
 
     
 
</body>
</html>
 
 
 
 
 
 
fereshteh
Top achievements
Rank 1
Veteran
 answered on 21 Feb 2021
3 answers
341 views

I am trying to replace a Bootstrap navbar with a Kendo UI appbar and I am facing two issues:

1) The embedded menu pops up within the appbar as in https://dojo.telerik.com/oPEbOmIX. How to fix this?

2) The appbar wraps controls on a second line when resizing.Is this the only behaviour? What is your suggestion for a more responsive approach?

Tsvetomir
Telerik team
 answered on 19 Feb 2021
12 answers
253 views

we started using an option to show all records in the grid by giving the user choose from predefined values [10, 25, 50, All], to set all to datasource we need to set it to undefined

grid.dataSource.pageSize(undefined);

 

but it will be ignored & page size will not be changed 

please provide workaround

 

 

 

Aleksandr
Top achievements
Rank 1
Bronze
Bronze
Veteran
 answered on 19 Feb 2021
2 answers
293 views

Is the code below still the only way to set the required AngularJS XSRF token when uploading or removing files? The value of the token needs to be taken from the XSRF-TOKEN cookie.

 

function onUpload(e) {

var xhr = e.XMLHttpRequest;

if (xhr) { xhr.addEventListener("readystatechange", function (e)

    {if (xhr.readyState == 1 /* OPENED */) {

         xhr.setRequestHeader("X-Foo", "Bar");

    }})}}

 

Petar
Telerik team
 answered on 19 Feb 2021
20 answers
231 views

Hello.

We've seen multiple problems with the layout transition effects:

1. The width of the view to navigate from is being reduced to a fraction of the actual width in the beginning of the transition.

2. The AppBar is not part of the transition effect if navigating back to a view with an AppBar "sticked" to the top and the vertical scrollbar position in the browser is not at the top.

3. Have seen the transition effect not working at all sometimes when navigating back to a previous view.

 

We're using Kendo UI for jQuery R3 2020.

 

Regards, Rolf

Rolf Falnes
Top achievements
Rank 1
Iron
 answered on 19 Feb 2021
2 answers
2.2K+ views

Hey,

I'm using a template to get a button into my grid toolbar since my atempt to write it analog to teh treelist doesn't work. But I can't access the click event. I want to open a custom create-dialog for grid items.

For the treelist i use something like this:

toolbar: [{
 
imageClass: 'k-i-plus',
name: 'createPosition',
text: 'New',
click() {
$('#newItemDialog').data('kendoDialog').open();
},
},
'search',
]

 

Since this doesn't seem to work I tried this but can't access the click-event:

 

$myGrid.kendoGrid({
        dataSource: myDatasource,
        columns: [
        ....
        ],
        toolbar: [
            {
                template: '<a class="k-button" href="\\#" id="newItemButton" ">New</a><span class="k-textbox k-grid-search k-display-flex"><input autocomplete="off" placeholder="Search..." title="Search..." class="k-input"><span class="k-input-icon"><span class="k-icon k-i-search"></span></span></span>'
            }
        ],
       
    }).after(() => {
        $('newItemButton').kendoButton({
            icon: 'k-i-plus',
            click: onNewClick
        });
    });
 
function onNewClick() {
    $('#newItemDialog').data('kendoDialog').open();
}
Hans-Jürgen
Top achievements
Rank 1
Veteran
 answered on 18 Feb 2021
1 answer
419 views

 

 

DateTimePicker does to not scroll to selected value when the TimePicker is opened since version 2020.2.513, is it a bug? If not, what can I do to achieve the behavior in latest version of Kendo UI for jQuery?

https://dojo.telerik.com/aJolodUn

Mihaela
Telerik team
 answered on 18 Feb 2021
1 answer
296 views

For our date fields when no date has yet been selected, on opening the calendar control, we want the start date to be set to a specific date. Is this possible?  Not today's date but a date in the past. 

I can set a default date but then on reaching that page the default date is showing in the input  - we don't want that.  On reaching the page , the date must show as blank and only on opening of the calendar, the date should be defaulting to our specified date. Then once a date is selected it can be shown in the input. 

Anton Mironov
Telerik team
 answered on 18 Feb 2021
3 answers
306 views

Hi,

We are using Kendo stock chart to display  365 days of data, but I can see that the full one year(365 days) data is not being displayed on the category axis in the default/ zoomout mode. But when i zoom in I can see the bars for each day. How can i fix this ? Is this something related to sample rate ? I need to show full data on the category axis.  Attaching images, first img is kendostock chart which won't display all data, second img is KendoChart which displays full set of data. But I need this work with KenoStock chart. Appreciate any help. 

 

 

 

 

 

 

 

 

 

Wasquez
Top achievements
Rank 1
 answered on 17 Feb 2021
8 answers
992 views

I need to refresh the whole treeview and I found on forums that to do that is to call .dataSource.read() method. However when I call this method the user does not see that the treeview is loading and he still sees the old data.

How to refresh the treeview and display the loading animation just like when the treeview is loaded for the first time?

Stoyan
Telerik team
 answered on 17 Feb 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?