Telerik Forums
Kendo UI for jQuery Forum
1 answer
470 views
Hi,

I have a Grid whose data source is an javascript array of objects. How to enable Deletion alone in this Grid ? When I add "destroy" and say "editable" as True then it is allowing editing of cells also. I do not want editing of cells.

Also the alert to delete repeats itself and the row is not getting deleted in the javascript array. Any reason why ?

Thanks.
Alexander Valchev
Telerik team
 answered on 11 Dec 2012
2 answers
204 views
i cannot upload with kendo upload in ie .
ie not suport ??
alireza
Top achievements
Rank 1
 answered on 11 Dec 2012
3 answers
145 views
When an $ajax call is made in a view's show or beforeShow event, how/when/where should we navigate to another view from the $ajax success or error callback?  What I am currently doing does not work properly.

Consider the following example with 3 views:

initialView
errorView
ajaxView

  • user starts on initialView and clicks a link to navigate to #ajaxView
  • ajaxView does an $ajax call in its beforeShow event.  
  • on success, the $ajax success callback does some processing and the view is displayed
  • on error, the  error callback evaluates the error and navigates to #errorView
The above steps don't work.  errorView is not displayed.  Here is the jsfiddle for above.


Petyo
Telerik team
 answered on 11 Dec 2012
1 answer
98 views
how to get the ID(Primary Key) of the row in the grid.
Alexander Valchev
Telerik team
 answered on 11 Dec 2012
6 answers
206 views
Team,
First let me start off by saying thank you for this great product you have released!

I wasn't sure whether to place this here or in the UserVoice area so I'm sorry if i have chosen incorrectly.

Issue:
When using the KendoUI Web Grid there appears to be an issue (perhaps due to my own issues) when using reorderable (not documented at http://www.kendoui.com/documentation/ui-widgets/grid/configuration.aspx) and groupable. They do not appear to be able to work in unison. Reorderable will work as intended but the dynamic grouping functionality will not. The grid does properly display the grouping bar but the drop action is being considered invalid since it is not being done in the column header area.

Thanks in advance for anything that can be done about this.

Daniel
jose
Top achievements
Rank 1
 answered on 11 Dec 2012
1 answer
297 views
Hi.
I'm using TreeView in a right to left page. but it is not showing as expected. This is the HTML I'm using:

<div class="k-rtl">
    <div id="accessTree"></div>
</div>

I'vs attached an image of what I see in Chrome.
I have managed to get it working by these lines of CSS:

.k-rtl .k-treeview .k-plus, .k-rtl .k-treeview .k-minus, .k-rtl .k-treeview .k-plus-disabled, .k-rtl .k-treeview .k-minus-disabled
{
    float: right;
}
.k-rtl .k-treeview .k-item
{
    padding: 0 16px 0 0;
}

The second image shows the tree after applying the css.
Am I missing something or this is an issue?
Thanks in advance.
Mahmood
Top achievements
Rank 1
 answered on 11 Dec 2012
1 answer
168 views
My problem is
I have this pattern in json format
{"data":[{"name":"John","street":{"street_name":"Square"},"id":"9"},{"name":"Annita","street":{"street_name":"Half"},"id":"8"}]}
How i cant show the street_name like a column in the grid without dropdown it is a field information 
thanks
I do not know if I explained well

Hardeep
Top achievements
Rank 1
 answered on 10 Dec 2012
2 answers
767 views
Hi, I am currently developing an app that has two listviews, one on the mainview, and another on the secondary view, both which are using remote data call using jsonp. the items generated on the first listviews are links to the next listview, I know it sounds confusing, basically im using jquery to grab an attribute from an element on the main listview and that is used for the URL of the new listview, similar to the problem in this forum: http://www.kendoui.com/forums/mobile/listview/mobile-listview-is-not-refreshing-on-button-click.aspx 

here is a copy of my code, hope you can understand and help me out here
Im having trouble loading the second listview with a dynamic URL
       <!--Main view-->
       <div data-role="view" data-init="mobileListViewDataBindInitFlat" data-title="ClickView 24/7 Alerts" id="mainView"  >
           <ul data-role="listview" data-style="inset" data-type="group"  id="result"></ul>
       </div>
       <!--Alerts Display view -->
       <div data-role="view" id="displayPage" data-title="ClickView 24/7 Alerts"  data-init="mobileListViewint" >
           <ul  data-role="listview" id="datashow"   >
           </ul>
       </div>
 
           <!--main layout-->
           <div id="layout" data-role="layout" data-id="main-layout">
               <div data-role="header">
                   <div data-role="navbar">
                       <span data-role="view-title"></span>
                   </div>
               </div>
                   <div data-role="footer">
                       <div data-role="tabstrip">
                           <a href="#mainView" data-icon="home">Home</a>
                           <a href="#alertPage" data-icon="favorites">Alerts</a>
                       </div>
                   </div>
           </div>
            
           <!-- Main Listview Template-->
           <script type="text/x-kendo-template" id="showtemp">
               <a class="show" href="\#displayPage" data-show="${ProgramId}">
               <span class="date">${Start}</span>
               <h2>${Title}</h2>
               <h3 class="chan">${Channel}</h3>
               <p class="descript">${Description}</p>
               </a>
                    
           </script>
            
           <!-- Alerts Listview Template-->
           <script type="text/x-kendo-template" id="datatemp">        
                    
                   <h3 class="keyword">Keyword: #: Keyword#</h3>
                   <a class="actionbutton"data-role="detailbutton" data-style="contactadd"></a>
                   <p class="subtime">#: SubTime#</p>
                   <p class="subtext">#: SubText#</p>
           </script>
 
<script>
           window.app = new kendo.mobile.Application(document.body,{transition: "slide", layout: "main-layout"});
            
           //Main ListView initialiser
           var showDataSource = new kendo.data.DataSource({
               transport: {
                   read: {
                       url: "http://localhost:3146/api/shows/wilan.bigay@clickview.com.au",
                       dataType: "jsonp",
                       contentType: "application/json; charset=utf-8",
                       data: {
                           q: "javascript"
                       }
                   }
               }
           });
           function mobileListViewDataBindInitFlat() {
               $("#result").kendoMobileListView({
                   dataSource: showDataSource,
                   template: $("#showtemp").text(),
               })
           }
            
           $('.show').live('click',function(){
               var progID = $(this).attr('data-show');
               var dataURL = 'http://localhost:3146/api/shows/wilan.bigay@clickview.com.au/data/' + progID
           });
            
           //Alerts ListView
           var dataDataSource = new kendo.data.DataSource({
               transport: {
                   read: {
                       url: dataURL , //"http://localhost:3146/api/shows/wilan.bigay@clickview.com.au/data/0000000",<- how it should look like taking the 'data-show' attribute at the end of the URL
                       dataType: "jsonp",
                       contentType: "application/json; charset=utf-8",
                       data: {
                           q: "javascript"
                       }
                   }
               }
               });
            
           function mobileListViewint() {
               $("#datashow").kendoMobileListView({
                   dataSource: dataDataSource,
                   click: function(e) {
                       //dataURL = e.dataItem.data-show;
                       console.log(e.dataItem.title);
                   },
                   template: $("#datatemp").text(),
               })
           }
 
     </script>

Sam
Top achievements
Rank 1
 answered on 10 Dec 2012
4 answers
1.4K+ views
I’m trying to load a tree from a JSON string which is being returned from a Java action instead of having it statically inside the HTML.


The original code was like so:

<script>
    $("#treeview-left, #treeview-right").kendoTreeView({
        dragAndDrop: true,
            dataSource: [
                { text: "Item 1", expanded: true, items: [
                    { text: "Item 1.1" },
                    { text: "Item 1.2" },
                    { text: "Item 1.3" }
                ] },
                { text: "Item 2", items: [
                    { text: "Item 2.1" },
                    { text: "Item 2.2" },
                    { text: "Item 2.3" }
                ] },
                { text: "Item 3" }
                        ]
    }).data("kendoTreeView");
</script>



I modified it like so:

<script>
    $("#treeview-left, #treeview-right").kendoTreeView({
        dragAndDrop: true,
            dataSource: {
                transport: {
                    read: {
                        url: "/site/GetTreeData.action",
                        dataType: "json"
                    }
                }
            }
    }).data("kendoTreeView");
</script>



The GetTreeData.action returns the following JSON string:

[
{ text: "Item 1", expanded: true, items: [
    { text: "<a href='http://localhost:8080/site/GetEmployee.action'>clear here</a>", encoded: false },
    { text: "Item 1.2" },
    { text: "Item 1.3" }
] },
{ text: "Item 2", items: [
    { text: "Item 2.1", items: [
        { text: "Item 2.1.1" },
        { text: "Item 2.1.2" }
    ] },
    { text: "Item 2.2" },
    { text: "Item 2.3" }
] },
{ text: "Item 3" }
]

If I paste the previous JSON string inside the page and reload it, the tree displays just fine.

So, what am I doing wrong?

Hari
Top achievements
Rank 1
 answered on 10 Dec 2012
3 answers
448 views
Hello,
I've been reading the existing documentation about the Treeview as well as the Hierarchical Data Source and the Data Source but I kinda lost it about the possible remote data source types that I can use with the Treeview.
Apart from json,xml is also supported right?Is it possible to bind it and view the xml file with the Treeview?
I've been trying something like:

<title>Tree View</title>
     
<link href="shared/styles/examples-offline.css" rel="stylesheet">
<link href="styles/kendo.common.min.css" rel="stylesheet">
<link href="styles/kendo.blueopal.min.css" rel="stylesheet">
 
<script src="js/jquery.min.js"></script>
<script src="js/kendo.web.min.js"></script>
<script src="shared/js/console.js"></script>
 
</head>
<body>
        <div id="example" class="k-content">
        <div id="treeview" class="demo-section"></div>
 
            <script>
                var ds = new kendo.data.DataSource({
                        transport: {
                            read: {
                                url:"http://localhost:8080/OnTheSpotRestfullAPI/testTree.xml"
                            }
                        },
                        schema: {
                            type: "xml",
                            data: "/tree/vehicles",
                            model: {
                                fields: {
                                    car: "car/text()",
                                    bike: "bike/text()"
                                }
                            }
                        }
                    });
 
                $("#treeview").kendoTreeView({
                    dataSource: ds
                });
            </script>
 
            <style scoped>
                #example {
                    text-align: center;
                }
 
                .demo-section {
                    display: inline-block;
                    vertical-align: top;
                    width: 320px;
                    height: 300px;
                    text-align: left;
                    margin: 0 2em;
                }
            </style>
        </div>
 
 
</body>
</html>

with the testTree.xml being:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<tree>
    <vehicles>
        <car>FM-1100</car>
        <car>FM-4200</car>
        <bike>FM-3100</bike>
    </vehicles>
    <personnel>
        <client>GH-3000</client>
        <vip>GH-3100</vip>
    </personnel>
</tree>

but I can't seem to be able to view the tree at all..kinda lost here,can someone please point me to the right direction?

Thanks in advance
Hari
Top achievements
Rank 1
 answered on 10 Dec 2012
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
DropDownTree
ListBox
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
Licensing
PivotGridV2
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
LLM Kit
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?