Telerik Forums
Kendo UI for jQuery Forum
1 answer
444 views

Hi,

I managed to create a hierarchy grid like the demo https://demos.telerik.com/kendo-ui/grid/hierarchy with two remote json data sources.  I am wondering if there is a way to achieve the same (see attached screen shot) with a single remote json datasource as follows.  Thank you!

{
    "categories": [
       {
           "categoryName": "SciFi",
           "description": "SciFi movies since 1970",
           "movies": [
               { "title": "Star Wars: A New Hope", "year": 1977},
               { "title": "Star Wars: The Empire Strikes Back", "year": 1980},
               { "title": "Star Wars: Return of the Jedi", "year": 1983}
            ]
       },
       {
           "categoryName": "Drama",
           "description": "Drama movies since 1990",
           "movies": [
              { "title": "The Shawshenk Redemption", "year": 1994},
              { "title": "Fight Club", "year": 1999},
              { "title": "The Usual Suspects", "year": 1995}
           ]
       }
    ]
}

Yue
Top achievements
Rank 1
 answered on 09 Apr 2020
2 answers
495 views

Hello,
I am new to Kendo UI.  I am trying to create a hierarchy grid with two json data sources with the following code (two json files at the bottom of the post).  The filter doesn't seem to take any effect.  All movies are listed for both categories.  It is the same when I change the filter to 'filter: { "field": "category", "operator": "eq", "value": "Drama"}'.  What am I missing?  Thanks.

        <div id="example">
            <div id="grid"></div>

            <script>
                $(document).ready(function() {
                    var element = $("#grid").kendoGrid({
                        dataSource: {
                            type: "json",
                            transport: {
                                read: "https://www.example.com/category.json"
                            },
                            schema: {
                               data: "categories"
                            },
                            pageSize: 6,
                            serverPaging: true,
                            serverSorting: true
                        },
                        height: 600,
                        sortable: true,
                        pageable: true,
                        detailInit: detailInit,
                        dataBound: function() {
                            this.expandRow(this.tbody.find("tr.k-master-row").first());
                        },
                        columns: [
                            {
                                field: "categoryName",
                                title: "Category",
                                width: "110px"
                            },
                            {
                                field: "description",
                                title: "Description",
                                width: "110px"
                            }
                        ]
                    });
                });

                function detailInit(e) {
                    $("<div/>").appendTo(e.detailCell).kendoGrid({
                        dataSource: {
                            type: "json",
                            transport: {
                                read: "https://www.example.com/movie.json"
                            },
                            schema: {
                               data: "movies"
                            },
                            serverPaging: true,
                            serverSorting: true,
                            serverFiltering: true,
                            pageSize: 100,
                            filter: { field: "category", operator: "eq", value: e.data.categoryName }
                        },
                        scrollable: false,
                        sortable: true,
                        pageable: true,
                        columns: [
                            { field: "title", width: "110px" },
                            { field: "year", width: "110px" }
                        ]
                    });
                }
            </script>
        </div>

#############################################################

category.json:

{
    "categories": [
       {
           "categoryName": "SciFi",
           "description": "SciFi movies since 1970"
       },
       {
           "categoryName": "Drama",
           "description": "Drama movies since 1990"
       }
    ]
}

###############################################################

movie.json:

{
    "movies": [
        { "title": "Star Wars: A New Hope", "year": 1977, "category": "SciFi" },
        { "title": "Star Wars: The Empire Strikes Back", "year": 1980, "category": "SciFi" },
        { "title": "Star Wars: Return of the Jedi", "year": 1983, "category": "SciFi" },
        { "title": "The Shawshenk Redemption", "year": 1994, "category": "Drama" },
        { "title": "Fight Club", "year": 1999, "category": "Drama" },
        { "title": "The Usual Suspects", "year": 1995, "category": "Drama" }
    ]
}

Nikolay
Telerik team
 answered on 08 Apr 2020
2 answers
1.2K+ views

Hi, Dev Team!

First of all thank you for awesome ScrillView control.

I did not catch how i can provide gallery for images with unknown height?

 

HTML:

<div id="scrollView" style="height: 600px; width: 100%;">   <--here i need dynamic height
</div>
<script id="scrollview-template" type="text/x-kendo-template">
    <div style="text-align: center;">
        <p>#=data.Name#</p><img src="#=setBackground(data.ServerRelativeUrl)#">
    </div>
</script>

 

SCRIPT:

        $("#scrollView").kendoScrollView({
            dataSource: AreaPhotoDS,
            template: $("#scrollview-template").html(),
            enablePager: true
        });

 

 

Andrey
Top achievements
Rank 1
Veteran
 answered on 08 Apr 2020
4 answers
585 views

Trying to figure out how to stop a move of Outlook Email during drag and drop. I have tested in your sample code in the Dojo it is also happening there. 

So what is happening is you drag and drop a email, which does work, but instead of making a copy and uploading that it pulls the email out of outlook completely. At first I thought this was a bug in outlook but I tried using the drag and drops of other sites using different browsers and they would not pull the email out of outlook. So I think it is an issue with Kendo UI drag and drop upload. Is this a known bug? Is there a workaround to fix this issue?

Josh
Top achievements
Rank 1
 answered on 08 Apr 2020
1 answer
162 views
Hi,

Is there any way of adding gradient cell background to cells within a certain range alternatively adding a specific css class to a certain range?

Best regards,

Ivan Danchev
Telerik team
 answered on 08 Apr 2020
1 answer
181 views

Hi,

 

im using kendo Jquery spreadsheet in angular application.we have a requirement to fill 4 values in one cell similar to the mockup attached. do we have any such customization available in kendo spreadsheet for the same? 

work around:

as cells in the mockup is read only, so for now im replacing the template created by kendo with some JavaScript code. how bad can this affect  the life cycle of plugin or framework ?

 

updateTemplate(){
    var d1 = document.getElementsByClassName('k-vertical-align-bottom');
    var template=this.htmlTemplate();
   for (var i=0 ;i<d1.length;i++){
    var element=d1[i];
    if(element.innerHTML=="p-40")
    {
      element.parentElement.style.padding="0";
      element.innerHTML=template;
    }
   }
  }

Dimitar
Telerik team
 answered on 08 Apr 2020
2 answers
1.1K+ views

the below code is use to generate kendoGrid. i want to create child row (no header) with value of "Comments" field, when "Comments" not empty. How can i achieve this. expecting your help.

 

<div id="grid"></div> <script> $("#grid").kendoGrid({ columns: [ { field: "productName" }, { field: "category" }, { field: "status" }, { field: "Comments"} ], dataSource: { data: [ { productName: "Tea", category: "Beverages", status: "Open", "Comments": "" }, { productName: "Coffee", category: "Beverages", status: "Open", "Comments": "comment1" }, { productName: "Ham", category: "Food", status: "Open", "Comments": "" }, { productName: "Bread", category: "Food", status: "Open", "Comments": "" }, { productName: "Hammer", category: "Hardware", status: "Closed", "Comments": "Comment test" }, { productName: "Screw", category: "Hardware", status: "Open", "Comments": "commenting testing" } ], group: { field: "category" } }, }); var grid = $("#grid").data("kendoGrid"); var dataView = grid.dataSource.view(); </script>

Kirubakaran
Top achievements
Rank 1
 answered on 08 Apr 2020
1 answer
199 views

I would like to change the format of the date in the "Day" view so that it shows the Day of week (ie. Mon, Tue, Wed, and so on).

I have tried setting the dateHeaderTemplate but it only changed the format in the week view.

I have also tried changing views.selectedDateFormat and views.selectedShortDateFormat none of which had any impact.

 

Any guidance?

Martin
Telerik team
 answered on 08 Apr 2020
2 answers
613 views

Hi there,

I found this post "Is a selected cell merged?" from the spreadsheet forums which is quite similar to what I want.

I have a kendo.ui.spreadsheet which the user selects a range of cell (including a merged cells).  From the post, it mentioned about "For a merged Cell the Property IsSingleCell is false", but I don't see a property definition of "IsSingleCell" in the spreadsheet API documentation. 

Where can I find this "IsSingleCell" property?  If this property exists, any dojo example would be awesome.

If not, is there a way to determine if the selected range in a spreadsheet contains a merged cell? 

I'm hoping that there will be a cell property like "merged" that returns true or false.

 

Any inputs is greatly appreciated.

Junius

Junius
Top achievements
Rank 2
 answered on 08 Apr 2020
6 answers
1.0K+ views
I have an Kendo upload control set to upload multiple files. The files upload as expected. The problem that I am facing is that I have to update a grid based on the files that were just uploaded. The problem is that the success handler is only fired once upon completion of the uploads. These are handled quickly as they are asynchronous. So, basically when the the success handler is reached I call  mygrid.dataSource.read(). This results in the datasource reading only the first record from the server since the others are not finished processing. There is no easy way to sort this problem out. The complete handler is fired immediately after the success handler so that doesn't help either. Seems like a bug to me but let me know if I am wrong. The success handler should fire once for each file and the complete handler should be fired only after all the files are uploaded successfully or not(am I wrong?).
Joon-Sae
Top achievements
Rank 1
 answered on 07 Apr 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
Drag and Drop
Application
Map
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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?