Telerik Forums
Kendo UI for jQuery Forum
1 answer
184 views
I'm using the PanelTab but expanded by establishing a default item with class "k-state-active" is not working.
Any suggestions?

<ul id="panelbar">
    <li class="k-state-active">
        ACCOUNT
<ul>
<li>Test</li>
</ul>
    </li>
<li> Other Item</li>
</ul>

Script:
$(function(){
 
    $("#panelbar").kendoPanelBar();
})
Kamen Bundev
Telerik team
 answered on 24 Nov 2011
3 answers
227 views
With Kendo UI, can one build apps for capturing GPS coordinates, saving to a database along with picture and text?  And also plotting multiple GPS points onto a map such as google maps?
andrew
Top achievements
Rank 1
 answered on 24 Nov 2011
3 answers
1.6K+ views
Hi,

I am using CodeIgniter on my backend to return a JSON result, depending on parameters sent via a POST. I wanted to directly link the result to a Grid, via a DataSource. However, I am having problems either understanding DataSources, or how they pass parameters.

In the examples, you provide:
var dataSource = new kendo.data.DataSource({
    transport
: {
        read
: {
           
// the remote service URL
            url
: "http://search.twitter.com/search.json",
           
// JSONP is required for cross-domain AJAX
            dataType
: "jsonp",
           
// additional parameters sent to the remote service
            data
: {
                q
: function() {
                   
return $("#searchFor").val();
               
}
           
}
       
}
   
}
 If I want to test this, I simply use a browser to check "
http://search.twitter.com/search.json?q=whatever
" and it returns what would appear in the DataSource above.

The problem is that CodeIgniter does not accept parameters in the form of "?q=whatever" as standard. It can, however, accept GET and POST information.

How can I do it? I have a few theories:

1. set up the DataSource correctly to pass the parameters in a GET or POST (how?)
2. do not use a DataSource, but a javascript object to bind to the Grid (seems like a waste, how is this done?)
3. extend DataSource like you did with odata to make a special class that knows how to handle parameters in GET/POST.

What would you recommend?
Atanas Korchev
Telerik team
 answered on 24 Nov 2011
0 answers
198 views
I'm trying to validate the data sent to the server when I run an UPDATE operation.

I'll try to be clearer. Here's the code in detail:


Kendo Script
------------------

          <script>
                $(document).ready(function() {
                    
 
                    var Item = kendo.data.Model.define({
                        id: "id_student"
                    });
                    
                    var model = null; 


      var JsonDataSource = new kendo.data.DataSource({
                        transport: {
                            read: {
                                url: "students_read.php", 
                                dataType: "JSON"
                            },
                            create: {
                                url: "students_add.php", 
                                type: "POST"
                            },
                            update: {
                                url: "students_update.php",
                                type: "POST"
                            } ,
destroy: {
                                url: "students_delete.php",
                                type: "POST"
                            }
                        },
                        schema:{
                            model: Item
                        }
                    });




                  function onChange() {
                   
    var tr = this.select();
                        var id = tr.data("id");
                        model = this.dataSource.get(id);
                   
                        $("#id").val(model.get("id_student"));         
                        $("#name").val(model.get("name"));
                                   
                    }


                 $("#grid").kendoGrid({
                        autoBind: false,
                        dataSource:JsonDataSource,
                        height: 350,
                        selectable: "row",
                        pageable: false,
                        sortable: true,
                        scrollable: true,
                        change: onChange,
                        columns: [
                                  { title : "Id", field :"id_student"},
                                  { title : "Name", field :"name"}
                                ]
                    });
                    
                    $("#btn_load").click(function() {
                        JsonDataSource.read({name: $('#search').val()});
                    });
                    
                     $("#search").keydown(function(e) {
                        if (e.keyCode === kendo.keys.ENTER) {
                            JsonDataSource.read({name: $('#search').val()});
                        }
                    });
                    
                    $("#btn_add").click(function() {
                        $('#id').val(null);
                        $('#name').val(null);
                    });
                    
                    $("#btn_save").click(function() {
                        if ($('#id').val() == ''){
                            JsonDataSource.add({ aluno: $('#name').val() });
                            JsonDataSource.sync();
                            $('#search').val($('#name').val());
                            JsonDataSource.read({name: $('#search').val()});
                        }else{
                            model.set("aluno", $('#name').val());
                            JsonDataSource.sync();
                        }
                    });
                    
                    $("#btn_delete").click(function() {
                        JsonDataSource.remove(model);
                        JsonDataSource.sync();
                    });
                
                });
            </script>


HTML tags
---------------

       <div id="example" class="k-content">
            <div>
                Search:&nbsp;&nbsp;<input id="search" name="search" />
                <button id="btn_load">Load Data</button>
            </div><br/>
            <div id="grid"></div>
            <dl>
                <dt>Student:</dt><br/>
                <dd>Id:&nbsp;&nbsp;<input id="id" name="id" readonly="readonly"/></dd><br/>
                <dd>Name:&nbsp;&nbsp;<input id="name" name="name" /></dd><br/>
                <dd><button id="btn_add">New</button>&nbsp;&nbsp;&nbsp;<button id="btn_save">Save</button>&nbsp;&nbsp;&nbsp;<button id="btn_delete">Delete</button></dd>
            </dl>
       </div>
            
PHP script (students_update.php)
--------------------------------------------
<?php


$host = "localhost";
$username = "root";
$password = "root";
$db = "school";


$id_student = $_POST["id_student"];
$name = $_POST["name"];
        
    mysql_connect($host,$username,$password);
mysql_selectdb($db);

mysql_query("UPDATE students set name = '".$name."'  WHERE id_student = '".$id_student."'");
$result = array("result" => (mysqli_affected_rows >= 0)); 

echo json_encode($result);
?>


I wonder how to implement the code above to show the result of the UPDATE operation (if there was success or failure) via an alert (). example;


if (result == true) {
  alert("Sucess Update");
}else{
  alert("Fault Update");
}


The question is: How do I do this? Anybody could implement the code? The only thing missing to complete the example that full CRUD (Kendo + PHP) and send to the community.
jiff
Top achievements
Rank 1
 asked on 24 Nov 2011
2 answers
127 views
Hi,

I was wondering if there was any reason I couldn't use CoffeeScript with the Kendo UI. Has anyone tried it and if so were there any gotchas.

TIA...
Cuinn
Top achievements
Rank 1
 answered on 24 Nov 2011
3 answers
422 views
Can Kendo UI be easily used along side some of the grid based CSS that are widely used. I was thinking on standardizing on Kendo UI along with ZURB's Foundation (http://foundation.zurb.com/) . Notice the mobile capabilities of Zurb Foundation. The other CSS framework that I'm currently reviewing is Blueprint (http://www.blueprintcss.org/).

If anyone has other used other CSS frameworks that should work well with Kendo UI please chime in.

TIA...
firestream99
Top achievements
Rank 2
 answered on 23 Nov 2011
5 answers
2.1K+ views
Hi,

I'm trying to show the value of a hidden column when the row is selected.  I know hidden cols value can be accessed by dataSource.view.  How can I do something like:

  alert(this.dataSource.view()[this.select().index()]);

where do I specific the index or field title I want to access, and how do I get it to return a string?

Thanks


jack
Top achievements
Rank 1
 answered on 23 Nov 2011
1 answer
523 views
How can I change the width of the splitter bars so they are easier to target on an iPad?
Dimo
Telerik team
 answered on 23 Nov 2011
3 answers
335 views
Is there any way to fire the upload action when the uploader is set to autoUpload: false?
I mean, using javascript not a click on a button.

thx.
Dimo
Telerik team
 answered on 23 Nov 2011
1 answer
171 views
I am trying to build the mobile application for stock market.So is it possible that stock market data can be updated in real time basis in kendo ui grid. Please guide me.
andrew
Top achievements
Rank 1
 answered on 22 Nov 2011
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
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?