Telerik Forums
Kendo UI for jQuery Forum
1 answer
165 views
I would like to suggest a simple upgrade to "Insert hyperlink". It would be great if you would split out the prefix from the address and have a selector that allows the user to choose website, email, or phone.

Selector: Website/Email/Phone
Address:sales@kendoui.com
Text: Kendo UI
Tooltip: Click Here
Open Link in new window: Yes

Results:
<a href="http://www.kendoui.com">Kendo UI</a>
<a href="mailto:sales@kendoui.com">Kendo UI</a>
<a href="tel:8883652779">Kendo UI</a>

Dimiter Madjarov
Telerik team
 answered on 01 Apr 2013
13 answers
623 views
I am trying to bind data from asp.net data control(data table) to Kendo UI Grid.
but i don't know how to bind data in grid using datasource
& what should i give input parameter to datasource method of Kendo UI Grid.

Does we have any other way to bind data other than JSON ?

Please explain me with example.
 
gowtham
Top achievements
Rank 1
 answered on 01 Apr 2013
1 answer
493 views
 Hi,

I'm migrating a project from ASP.NET MVC Extensions to KendoUI. I'm trying to figure out the best way to re-create this grid binding using KendoUI and without any serverside code. I can't find anything to do with onRowDataBound or similar in the documentation.

As you can see, as each row is databound, it attaches the countdown jquery plugin (http://keith-wood.name/countdown.html) and uses the current dataItem's Due datetime value.

Is the only way to do this using javascript inside the <script id="rowTemplate" type="text/x-kendo-tmpl"> element?

How can I recreate this to work with KendoUI?
function onRowDataBound(e) {
 
     e.row.cells[2].innerHTML = "<span class='countdown-" + e.dataItem.SONumber + "'></span>"
 
     if (e.dataItem.Due != null && e.dataItem.Due < new Date(2015, 4, 1) && e.dataItem.Due > new Date(2011, 4, 1)) {
         $('.countdown-' + e.dataItem.SONumber).countdown({
             until: new Date(Date.parse(e.dataItem.Due)), compact: true,
             layout: '<strong>{dn} {dl} {hnn}{sep}{mnn}{sep}{snn}</strong>',
         });
     }
 
 
 }

This is sample output for one row once it has been rendered:
<tr style="background: none repeat scroll 0% 0% rgb(255, 134, 112);">
   <td>43475</td>
   <td>New</td>
      <td>
         <span class="countdown-43475 hasCountdown">
            <strong>0 d 00:00:00</strong>
         </span>
      </td>
   <td>Account</td>
   <td>Description</td>
   <td>Cons</td>
   <td class="t-last">P3 - 24H</td>
</tr>
Thanks
RGTech
Top achievements
Rank 1
 answered on 01 Apr 2013
2 answers
137 views
When I have a ModalView open and change the orientation of my iPad, the ModalView is no longer centered.  How do I get it to re-center? I assume I need to bind on the orientationchange event, but I don't know what code I can use to re-center.

     $(window).bind('orientationchange', reCenter);

     function reCenter() {
          // unknown recenter code??
     }

Thank you,
Jason
Jason
Top achievements
Rank 1
 answered on 30 Mar 2013
3 answers
167 views
For a specific reason I'd like to use my kendo mobile app also through desktop browser (webkit). Is there a way to enable mouse wheel scrolling of my views?
Yrjo
Top achievements
Rank 1
 answered on 30 Mar 2013
1 answer
103 views
Are you planning to support sliders and pickers in KendUI Mobile anytime soon? Is there any workaround or any good third party widget you use to add a slider range? I tried with <input type="number">, but it's ugly.

Thanks for the information.
Iliana Dyankova
Telerik team
 answered on 29 Mar 2013
1 answer
210 views
Hello all,

I am trying the detail template today and I have the detail template for my parent grid (pasted below).   The CustomerNumber is coming from the parent grid and I am getting my read result set just fine.  The issue is the parameters I need such as "DocID" you will below are coming up undefined.   Those params are in the model for the template I have DocumentModel.   How do I pass those params from the detail template model versus the parent model?

<script id="template" type="text/kendo-tmpl">
@(Html.Kendo().TabStrip()
.Name("tabStrip_#=CustomerNumber#")
.SelectedIndex(0)
.Animation(animation => animation.Open(open => open.Fade(FadeDirection.In)))
.Items(items =>
{
items.Add().Text("Attachments").Content(@<text>
@(Html.Kendo().Grid<ABC.DataModel.Document.DocumentModel>()
.Name("grid_#=CustomerNumber#")
.Columns(columns =>
{
columns.Bound(p => p.DocumentType).Width(40).Title("Type").ClientTemplate("#=RenderImage(data)#");
columns.Bound(p => p.DocumentName).ClientTemplate(@Html.ActionLink("#=DocumentName#", "DownloadFile",
new { ID = "#=DocID#", fileRef = "#=FileRef#", fileName = "#=DocumentNameExt#" }).ToHtmlString());
columns.Bound(p => p.ModifiedDate).Title("Modified");
columns.Bound(p => p.ModifiedBy).Title("Modified By");
columns.Bound(p => p.LatestVersion).Title("Latest Version");
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("CustomerAttachments_Read", "Customer", new { library = "#=CustomerNumber#" }))
)
.Pageable()
.Sortable()
.ToClientTemplate())
</text>
);
})
.ToClientTemplate())
</script>
Sean Bornstein
Top achievements
Rank 1
 answered on 29 Mar 2013
3 answers
498 views
Thank you all in advance for your assistance. I am new to Kendo and trying to work my way through some event examples. I have two questions.

For my scenario I have an array of items that I am binding to a treeview. Each data item looks like this...
[{"id": 24820, "parentId": 0, "title": "Kendo", "target": "_blank", "href": "http://www.kendoui.com", "active": true, "hasChildren": false}, ...]

Questions #1: Can I access data elements of a node on a select event?

Question #2: Is there a way to cancel page change onSelect? e.preventDefault() does not seem to work for me.

I am trying to use the data above and onSelect determine if the "target" is set to "_blank". If it is, I want to execute an open new window and prevent the current page from changing. If not, I want the normal logic to run.

Sample Code:
<div id="menu" class="k-content">
    <div id="treeview"></div>
</div>
<script type="text/javascript">
    var data = new kendo.data.HierarchicalDataSource({
        transport: {
            read: {
                url: "api/menu",
                type: "GET",
                dataType: "json",
                contentType: "application/json"
            }
        },
        schema: {
            model: {
                id: "id",
            }
        }
    });
 
    function onSelect(e) {
        var targetIsBlank = false;
        // TODO: Check e.node passed and determine if "target" is "_blank"
        if (targetIsBlank) {
            // TODO: open new window with target and href properties
            e.preventDefault(); // this doesn't work when dataUrlField is set
        }
    }
 
    $("#treeview").kendoTreeView({
        dataSource: data,
        dataTextField: "title",
        dataUrlField : "href",
        select: onSelect,
    });
</script>
zhao
Top achievements
Rank 1
 answered on 29 Mar 2013
8 answers
163 views
Is this even possible? Any suggestions? I tried both through a datasource, and with native js + jquery and as soon as elements are added the scroller loses its ability to scroll.

example code below:
an example json file can be found here": https://projects-galcohen.rhcloud.com/shutup/channels.json

 <div id="mypage" data-layout="default" data-role="view" data-init="getScroller">
                Foo2222
            <div class="clearfix" id="channelcontainer" data-role="scroller" ></div>
            </div>
                    
        
        <script id="channeltemplate" type="text/x-kendo-template">
             <div class="img_icon">
                 name:#= name # <br>
                 chan:#= number # <br>
                 priority:#= priority # <br>
                 
             </div>
            
       </script>
            
        <script>
            
            var dataSource = 0; 
            var template = kendo.template($("#channeltemplate").html());
            
            function getScroller(e) {
                alert("HIHIHIH");
                     console.log("MADE IT HERE");
                dataSource = new kendo.data.DataSource({
                    transport: {
                        read: {
                            url: "channels.json",
                            dataType: "json",
                        }
                    },
                    schema: {
                        data: "channelresults"
                    },
                    change: function() { // subscribe to the CHANGE event of the data source
                        $("#channelcontainer").height(150);
                        $("#channelcontainer").html(kendo.render(template, this.view()));
                        
                    }
                });
            
                dataSource.read();
                var scroller = e.view.scroller;
            }

        </script>
Alexander Valchev
Telerik team
 answered on 29 Mar 2013
10 answers
87 views
it seems that the initScroller function is never being called. If I call it manually, the json file does load and the divs appear, but the outer div loses its Scroller abilities.

Any idea what I might be doing wrong?

<div class="clearfix" id="channelcontainer" data-role="scroller" data-init="initScroller">
                       
</div>

 <script id="channeltemplate" type="text/x-kendo-template">
             <div class="img_icon">
                 name:#= name # <br>
                 chan:#= number # <br>
                 priority:#= priority # <br>
             </div>
       </script>


<script>
            var dataSource = 0; 
            var template = kendo.template($("#channeltemplate").html());
            
            function initScroller(e){
                //alert("hi");
                dataSource = new kendo.data.DataSource({
                    transport: {
                        read: {
                            url: "channels.json",
                            dataType: "json",
                        }
                    },
                    schema: {
                        data: "channelresults"
                    },
                    change: function() { // subscribe to the CHANGE event of the data source
                        $("#channelcontainer").html(kendo.render(template, this.view()));
                    }
                });
            
                dataSource.read();
                
                var scroller = e.view.scroller;
            }
        </script>
            
        <script>
            var app = new kendo.mobile.Application(document.body);
        </script>


this is the json file: https://projects-galcohen.rhcloud.com/shutup/channels.json
 



Gal
Top achievements
Rank 1
 answered on 29 Mar 2013
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
Dialog
Chat
DateRangePicker
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
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?