Telerik Forums
Kendo UI for jQuery Forum
8 answers
960 views
Hey guys,

having fun with kendo and jquery, learning and stuff.

i tried pulling up a html form within tab strips, and quickly found they dont work, or at least not to me.
is it possible to make this work, or would it be asking too much.

thanks in advanced

Kamen Bundev
Telerik team
 answered on 18 Jan 2012
3 answers
945 views
I am using a grid with some local data, but I want to use some simple html before and after one of the fields in a column.  I'm actually doing it in the PHP code before it even gets into the array "data_source".  

I just want html to parse inside the grid basically.

$(document).ready(function() {
     $("#grid").kendoGrid({
         dataSource: {
             data: booking_data,
             schema: {
                 model: {
                     fields: {
                         invoice_id: { type: "number" },
                         invoice_date: { type: "string" },
                         invoice_name: { type: "string" },
                         invoice_price: { type: "number" },
                         invoice_status: { type: "string" }
                     }
                 }
             },
             pageSize: 15
         },
         scrollable: true,
         sortable: true,
         filterable: true,
         pageable: true,
         columns: [
             {
                 field: "invoice_id",
                 title: "Invoice ID"
             },
             {
                 field: "invoice_date",
                 title: "Invoice Date"
             },
             {
                 field: "invoice_name",
                 title: "Customer Name"
             },
             {
                 field: "invoice_price",
                 title: "Invoice Price"
             },
             {
                 field: "invoice_status",
                 title: "Invoice Status"
             }
         ]
     });
 });
John DeVight
Top achievements
Rank 1
 answered on 18 Jan 2012
0 answers
90 views
I am planning of using rest service as my datasource.
Will give me an example of how i can do that.
Thanks,
Edmund
Top achievements
Rank 1
 asked on 18 Jan 2012
2 answers
363 views
I'm having trouble getting tab items to stretch vertically based on the height of the parent tabstrip. What is happening is my items div ends up going past the tabstrip div. I cant help but think there is something going on behind the scenes that I'm missing.

Thanks

I have the following layout:

HTML:

<div id="tabstrip">
    <ul>
        <li class="k-state-active">First Tab </li>
        <li>Second Tab </li>
    </ul>
    <div class="workspace">
        <p>
            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer felis libero, lobortis
            ac rutrum quis, varius a velit. Donec lacus erat, cursus sed porta quis, adipiscing
            et ligula. Duis volutpat, sem pharetra accumsan pharetra, mi ligula cursus felis,
            ac aliquet leo diam eget risus. Integer facilisis, justo cursus venenatis vehicula,
            massa nisl tempor sem, in ullamcorper neque mauris in orci.</p>
    </div>
    <div class="workspace">
        <p>
            Ut orci ligula, varius ac consequat in, rhoncus in dolor. Mauris pulvinar molestie
            accumsan. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere
            cubilia Curae; Aenean velit ligula, pharetra quis aliquam sed, scelerisque sed sapien.
            Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos
            himenaeos. Aliquam dui mi, vulputate vitae pulvinar ac, condimentum sed eros.</p>
    </div>  
</div>

CSS:

#tabstrip
{
    position: absolute;
    top: 40px;
    bottom: 0px;
}

.workspace
{
    height: 100%;
}
Kamen Bundev
Telerik team
 answered on 18 Jan 2012
1 answer
272 views

How would I go about looping through the entire items in a menu but only get the items from the last nested list? Say I have the following menu:

  • Animals
    • cat
    • dog
    • parrot
  • Food
    • Drinks
      • water
      • Pepsi
      • booze
    • Fruit
      • apple
      • pear
      • carrot

The items in bold is what I mean - the end of the line so to speak in each root item.

Kamen Bundev
Telerik team
 answered on 18 Jan 2012
4 answers
163 views
Hi,

Is it possible to have Grid Virtualization +  Filter + Multiple sorting? Or at least Grid Virtualization +  Filter?

I'm looking for something like http://www.smartclient.com/#adaptiveFilter ...so I think Grid Virtualization +  Filter + Multiple sorting could achieve this.

It would be very useful.
Thanks.
Levente Mihaly
Top achievements
Rank 1
 answered on 18 Jan 2012
0 answers
103 views
I have problem with second grid means gridProperty . It not display data. What is the problem ., Please give me the reply for that .
In this code i pass topic_id to changedatasource ,it takes proper URL when i put gridProperty grid in change function then it display proper data but when i select another row then it display another grid it not refresh that.,display multiple grid.i dont want that display multiple grid ..
var dataSource = new kendo.data.DataSource({
                            transport: {
                                        read: {url:"topics.json",
                                          dataType:"json"}
                                          },
                               schema: {
                                model: {
                                            id: "topic_id",
                                fields: {
                                        TopicID: { type: "string" },                    
                                           name: { type: "string" },
                                        parent_topic_name: { type: "string" },
                                        owner_name: { type: "string" },
                                        description: {type: "string"},
                                            }
                                    }
                                    },
                            pageSize: 8,
                        });
                var selectedTopic;    
                var changedatasource;
$("#grid").kendoGrid({
    dataSource: dataSource,   
    pageable: true,
    sortable: true,
    selectable: true,
    toolbar: kendo.template($("#template").html()),
    columns: ["topic_id", "name","parent_topic_name","owner_name","description"],
    change: function() {
 
         var id = this.select().data("id");
         selectedTopic = this.dataSource.get(id);
        $("#log")
            .html(selectedTopic.get("parent_topic_name") + " > " + selectedTopic.get("name") + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +"\
                  Owned By :" +selectedTopic.get("owner_name"));
        $("#desc")
            .html("Description : " + "<br>" +selectedTopic.get("description"));
        $("#tID")
            .html("ID : " + "<br>" +selectedTopic.get("topic_id"));    
             changedatasource = new kendo.data.DataSource({
                        transport: {
                                 read: {url:selectedTopic.get("topic_id")+"/properties.json",
                                  dataType:"json"}
                                },
                               schema: {
                                model: {
                                            id: "topic_property_id",
                                fields: {
                                        topic_property_id: { type: "string" },                    
                                           name: { type: "string" },
                                        data_type: { type: "string" },
                                        sort_order: { type: "number" },
                                        description: {type: "string"},
                                            }
                                    }
                                    },
                            pageSize: 5,
                        });
                    
    }
});
 $("#gridProperty").kendoGrid({
        dataSource:changedatasource,
        height: 250,
        columns: ["name","data_type","sort_order","description"]
     });
Mahesh
Top achievements
Rank 1
 asked on 18 Jan 2012
1 answer
162 views
I'm trying to add an image to a row in a grid without using a row template. You can see how I'm trying to do this below:
columns: [{
            field: "Title",
            title: "Title",
            format: "<img src='/Images/${ SKU }_small.jpg' alt='${ Title }' />"
        }, {
            field: "OFLC",
            title: "Rating",
            width: 55
        }, {
            field: "Price",
            title: "Price",
            template: "$${ Price }"
        }]

The result is this:
<img src='/Images/${ SKU }_small.jpg' alt='${ Title }' />
showing up instead of the image...

Is it possible to acheive without a row template?
Nikolay Rusev
Telerik team
 answered on 18 Jan 2012
1 answer
70 views
Hello

I want to customize the texts of kendo grid. How can I make this?:

Toolbar:
- Save Changes  (save)
- Cancel changes (cancel)

Commands:
- Delete (destroy). When I try to delete a row it appears a modal box that asks me if I really want to delete it ("Are you sure you want to delete this record?"), I'd like to change it too.

Is there any easy way to change it?

Thanks a lot.
Nikolay Rusev
Telerik team
 answered on 18 Jan 2012
1 answer
147 views
Hi everyone,

Just discovered the Kendo UI. Awsome!
I'm trying to add a button to open a window with datepicker on a grid and it seems to be tricky...
The datepicker should then update a SQL database but i will check through odata later.

Here is the first code:
*edit: here is my try with the window code:
<head>
    <title>Test</title>
     
    <link href="styles/kendo.common.css" rel="stylesheet"/>
    <link href="styles/kendo.silver.css" rel="stylesheet"/>
    <link href="styles/common.css" rel="stylesheet"/>
         
    <script src="js/jquery.min.js"></script>   
    <script src="js/kendo.core.min.js"></script>
     
    <script src="js/kendo.fx.min.js">//Menu</script>
    <script src="js/kendo.popup.min.js"></script>
    <script src="js/kendo.menu.min.js"></script>
     
    <script src="js/kendo.data.min.js">//Grid</script>
    <script src="js/kendo.pager.min.js"></script>
    <script src="js/kendo.sortable.min.js"></script>
    <script src="js/kendo.draganddrop.min.js"></script>
    <script src="js/kendo.groupable.min.js"></script>
    <script src="js/kendo.grid.min.js"></script>
     
    <script src="js/kendo.resizable.min.js">//Windows</script>
    <script src="js/kendo.window.min.js"></script>
 
     
</head>
<body>
<div id="main">
    <?php include("menu.php"); ?>
    <div id="content">
        <div id="grid"></div>
    </div>
<script>
function createData() {
    var data = [];
<?php
$mysql_serveur = "localhost";
$mysql_pseudo = "root";
$mysql_pass = "";
$mysql_bdd = "test";
$connexion = mysql_pconnect($mysql_serveur,$mysql_pseudo,$mysql_pass) or die("Erreur1");
if(!$connexion ) die("Erreur2");
if(!mysql_select_db($mysql_bdd)) die("Erreur3");
$sql = "SELECT * FROM table ORDER BY DUE";
$req = mysql_query($sql);
$datejour=date("Y-m-d");
$djour = explode("-", $datejour);
while ($row = mysql_fetch_assoc($req)){
    $dfin = explode("-", $row['DUE']);
    if($dfin<$djour){
        if($row['START']<>0) {$start=$row['START'];} else{
            $start="<span id='date' class='".$row['NUM']."'>Select</span>";
        }
        if($row['DESC']<>"") {$des="Description";} else{$des="";}
        echo 'data.push({
            ID: "'.$row['NUM'].'",
            NOM: "'.$row['NOM'].'",
            DEP: "'.$row['DEP'].'",
            DUE: "'.$row['DUE'].'",
            DES: "'.$des.'",
            START: "'.$start.'",
            COMP: "'.$row['DONE'].'"
        });';
    }
}
?>
   return data;
}
</script>
<script>
    $(document).ready(function() {
        $("#menu").kendoMenu();
        var getEffects = function () {
             return ($("#opacity")[0].checked ? "fadeIn" : "");
        };
        var initMenu = function () {
            $("#menu").kendoMenu({
            animation: { open: { effects: getEffects() } },
                hoverDelay: 2
            })
        };
        $("#grid").kendoGrid({
            dataSource: {data: createData(),pageSize: 20},
                height: 360,
                groupable: true,
                scrollable: true,
                sortable: true,
                pageable: true,
                columns: [
                    {field: "NOM", width: 150, title: "Name" },
                    {field: "DEP",width: 40,title: "Depth"},
                    {field: "DES",width: 30,title: "Description",template:'<a href="description.php?des=#=ID#">#=DES#</a>'},
                    {field: "DUE",width: 30,title: "Due date"},
                    {width: 50,title: "Started",template:'#=START#'},
                    {width: 30,title: "Completed",template:'<a href="maj.php?comp=#=ID#">Select</a>'}
                ]
        });
    });
        initMenu();
</script>
<script>
    $(document).ready(function() {
        var window = $("#window"),
                        date = $("#date")
                                .bind("click", function() {
                                    window.date("kendoWindow").open();
                                });
        if (!window.data("kendoWindow")) {
                        window.kendoWindow({
                            width: "500px",
                            title: "Pick a date",
                            actions: ["Refresh", "Close"],
                            content: 'ajaxContent.html',
                            open: onOpen,
                            activate: onActivate,
                            close: onClose,
                            deactivate: onDeactivate,
                            resize: onResize,
                            dragend: onDragEnd,
                            refresh: onRefresh
                        });
                    }
    });
</script>
<div id="window"></div>
        </div>
</div>
    </body>

Where are the mistakes?
Gy
Top achievements
Rank 1
 answered on 18 Jan 2012
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
Date/Time Pickers
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)
SPA
Filter
Drawer (Mobile)
Drawing API
Globalization
Gauges
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
OrgChart
TextBox
Effects
Accessibility
ScrollView
PivotGridV2
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Collapsible
Localization
MultiViewCalendar
Touch
Breadcrumb
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
Popover
DockManager
FloatingActionButton
TaskBoard
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
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?