Telerik Forums
Kendo UI for jQuery Forum
3 answers
1.4K+ views

I made a simple TreeList.

The data from the server is simple JSON array.

[{"Description":"111","id":1,"Name":"CEO"},{"Description":"222","id":2,"parentId":1,"Name":"Jane"},{"Description":"333","id":3,"Name":"Tom"},{"Description":"444","id":4,"Name":"Susan"}]

TreeList java script  code is below but this always display "No records to display"

When I remove "model" object under "schema" in DataSource It works well.

I don't know what is the problem.

Please help me to solve this proble.

 

var dataSource = new kendo.data.TreeListDataSource({
    transport : {
        read : {
            url: "ReadAsset",
            dataType: "json"
        }
},
        schema: {
            model: {
                id: "id", 
                parentId: "parentId",
                expanded: true
            }
        }
    });


    $("#treelist").kendoTreeList({
        dataSource: dataSource,
        height: "99%",
        columns: [
            { field: "Name" },
            { field: "Description" }
        ]
    });

 

 

Nikolay
Telerik team
 answered on 02 Sep 2020
6 answers
203 views
In the Kendo Tree View component, when you append a new item, the function will return a reference to the new node.  That way, it's easy to build a node hierarchy:
rootNode = myTreeView.append({ text: "MyRoot" }, null);
subNode = myTreeView.append({ text: "MySubNode" }, rootNode);
myTreeView.append({ text: "MyThirdLevelNode1" }, subNode);
myTreeView.append({ text: "MyThirdLevelNode2" }, subNode);

However, I can't find a way to do the same with the Kendo Menu component.  So far, the only I've found to create a menu dynamically is adding a specific ID and getting the menu item with this ID.
MyMenu.append('<li id="RootMenuItem" class="k-item">MyRootItem</li>');
MyMenu.append('<li id="MySubItem" class="k-item">SubItem</li>', $("#RootMenuItem"));

Is there a way to get the newly created item and reuse it as the parent reference for the menu?

Regards,

Simon








Neli
Telerik team
 answered on 02 Sep 2020
6 answers
543 views
The site has a sample code.
http://demos.kendoui.com/web/menu/api.html

With this all clear... Is there a possibility of adding attributes href, class, role? 
Neli
Telerik team
 answered on 02 Sep 2020
3 answers
882 views

Hi,

I have a Grid that is generated dynamically in javascript.

The columns are parametered on the server and I received the configuration in Json. Then I build the Grid as scrollable by default because I can't determine it.

On "databound", I used the "autofit" function to resize each columns. But sometimes, the table width is bigger than the sum of the columns'width and I would like to dispatch the empty width on each columns.

 So, is it possible to resize a column dynamically by setting its width such like that ?

myGrid.columns[0].setWidth("500px");

 

Is it possible to dynamically change the behaviour of a scrollable Grid to a non scrollable Grid ( so that column resizing behaves like if it was initially configured as non scrollable ) ?

 

Thanks for your help,

Regards

Jammer
Top achievements
Rank 1
 answered on 02 Sep 2020
1 answer
150 views

Hi,

I have a problem related to pdf export. If exported view is too long, it's not visible in pdf, and I must zoom it for looking smth (see pdf-export.png). Can I do smth, for example export pdf already zoomed in, and zoom it out if needed? 

Martin
Telerik team
 answered on 02 Sep 2020
1 answer
296 views

Hi, I set the pageSize option on the grid, but I'm having a hard time because it's not shown on the screen.

So I can't see the page selection drop-down even though I deactivated all my csss and enabled only the css and js related to kendo.

What should I check to solve this problem?

I will attach my current screen and my grid creation code.

Help me...

 

$("#dataTable").kendoGrid({
        sortable: true,  
        selectable: true,
        groupable: false,
        scrollable: true,
        dataSource: {
            data: [],
            pageSize : 10
        },
        pageable: {
              pageSizes: [10,50,100]
        },
        columns: [
           { title: "No",  attributes:{style: "text-align: center"}, template: "#= renderNumber(data) #",  width: "50px"},
        { field: "id", title: "SEQ", width: "130px", hidden:true},
        { field: "registDt", title: "일시", width: "160px", attributes:{style: "text-align: center"}, template: '#=registDt==null?" ":new Date(registDt).getDateTime()#' },
        ], 
        //dataBound: resetRowNumber,
    }); 





"registDt
 
 
 
Ivan Danchev
Telerik team
 answered on 01 Sep 2020
5 answers
847 views
I am using Upload MVC in our application and file list is hidden by default in our app.  But Upload still show upload status below the upload button. How to hide the status data?

<strong class="k-upload-status k-upload-status-total">Done<span class="k-icon k-warning">uploaded</span></strong>
Ivan Danchev
Telerik team
 answered on 01 Sep 2020
1 answer
785 views

I am updating an older site running AngularJS and Kendo in Asp.Net MVC

My html Form has this control that is posted to the back end:

 

@using (Html.BeginForm( new { name = "frmMain", novalidate = "", id = "frmMain"  }))
      <input kendo-date-picker
      ng-model=".BiWeeklyStartDate"
           k-parse-formats="['yyyy-MM-dd']"
           k-format="'yyyy-MM-dd'"/></p>

The date that is posted to the backend is a full date. How can I change that so that the Kendo Control sends "yyyy-MM-dd" to the backend only?

Nikolay
Telerik team
 answered on 01 Sep 2020
7 answers
2.4K+ views

Hi,

 

Is there any way to control the delete button which is displayed by using the {command: 'destroy',title:"Action", width:"20px",attributes: {"class": "delete-row"}

It is doing the necessary thing right, that is deleting a row, but i would like to control it such a way that if there's only one row remaining in that particular grid, it should alert or display a message saying that you will not be able to delete it.

If there are more than one rows then, its ok. But if there is only 1 row remaining, I wanted to handle this.

 

Can you please tell me a method for doing so?

Thank you.

Viktor Tachev
Telerik team
 answered on 01 Sep 2020
9 answers
169 views

This is my func userNameAutoCompleteEditor

function userNameAutoCompleteEditor(container, options) {
    $('<input required data-bind="value:' + options.field + '"/>')
        .appendTo(container)
        .kendoAutoComplete({        
            dataTextField: "UserName",
            dataValueField: "UserId",
            filter: "contains",
            minLength: 3,
            //_readMethod: '../Warehouse/SearchUser',
            dataSource: new kendo.data.DataSource({
                transport: {
                    read: {
                        url: '../Warehouse/SearchUser',
                        //data: {
                        //    q: function () {
                        //        return $("#autoComplete").data("kendoAutoComplete").value();
                        //    },
                        //    maxRows: 10,
                        //    username: "demo"
                        //}
                    }
                },
            }),
        });
}

 

    "" " I want to Catch autosearc value go connroller and come back with user name contains value just give me way to take value PLEASE!!!!""

This is my grid column area

grid._columns.push(grid.GridColumn('Id', null, '200px', null, null, null, null, null, null, null, true));
grid._columns.push(grid.GridColumn('User', 'User', '200px', null, "#=User.UserName#", null, null, null, null, null, null, null, null, null, userNameAutoCompleteEditor));
grid._columns.push(grid.GridColumn(null, ' ', '200px', { style: 'text-align:right' }, null, null, null, null, null, null, null, null, null, ['edit', 'destroy']));
Aleksandar
Telerik team
 answered on 01 Sep 2020
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?