Telerik Forums
Kendo UI for jQuery Forum
3 answers
312 views
I have just started to use the autocomplete and so far it looks pretty good.

Is there anyway to add watermark text to the textbox that has the autocomplete attached to?

Thank you
Shane P
Top achievements
Rank 1
 answered on 16 Jan 2012
1 answer
603 views
I'm having problems in binding a json data fetched from a php file to a grid. Here's what my php file looks like:
$studs = array();
$db->query("SET CHARACTER SET utf8");
$students = $db->get_results("SELECT * FROM tbl_participants");
if(!empty($students)){
    foreach($students as $k=>$v){
         
        $studs['participant'][] =  $v->participant;
    }
}
echo json_encode($studs);

And here's the file where I have the grid:
<script>
 $(document).ready(function() {
   var dataSource = new kendo.data.DataSource({
    transport: {
     read: {
      
      url: "fetch_data.php",
      dataType: "json"
     }
    },
    schema: {data: "participant"}
   });
  
   $("#grid").kendoGrid({
    dataSource: dataSource,
     height: 360,
     groupable: true,
     scrollable: true,
     sortable: true,
     pageable: true,
     autoBind:true,
     columns: [
         
        {field: 'participant', title: 'Name'}
         
     ]
      
   });
 });
</script>
<table id="grid"></table>
Andrew
Top achievements
Rank 1
 answered on 16 Jan 2012
2 answers
968 views
Instead of listing the filters in code like this:
dataSource.filter([    
{ field: "orderId", operator: "neq", value: 42 },    
{ field: "unitPrice", operator: "ge", value: 3.14 }
]);

I would like to add them from a JSON array. How would I go about this? When I try, all I get is one filter being appended to the query string not in the correct format, rather looking like this:
filter[filters][]

instead of:
filter[filters][0][field]
filter[filters][0][operator]
filter[filters][0][value]
Gabriel
Top achievements
Rank 1
 answered on 15 Jan 2012
0 answers
105 views
Hi,

I added a post to my (very new) blog to demonstrate how you can create a Kendo UI menu from a ASP.NET Control...

See it here...
Peter
Top achievements
Rank 1
 asked on 15 Jan 2012
0 answers
53 views
After breaking my head for a whole day
Here is the code that is working well. I hope that you find it useful
Sorry for my English.

$("#grid").kendoGrid({
    dataSource: {
        type:"json",
        transport: {
            read: {                   
                dataType: "json",
                type: "POST"
            },
            parameterMap: function (options) {
               return JSON.stringify({"serviceName" : "ActoresPublicoService","methodName" : "getPaises","parameters" : []});
                }
            },
            schema: {
                model: {
                    fields: {
                        title: { type: "string" }
                      
                    }
                }
            }
        },
    height: 250,
    filterable: true,
    sortable: true,
    pageable: true,
});

 

                        

 

 

Tirso
Top achievements
Rank 1
 asked on 14 Jan 2012
4 answers
345 views
Greetings, I am not sure what's happening here, but I am unable to obtain data from a selected row in my code:
var selectedActivity;
 
var activityModel = kendo.data.Model.define({
  id: "_id",
  fields: {
    _id : {type:"string"},
    date: {type:"string"},
    activity : {type:"string"},
    hours : {type:"number"}
  }
});
 
dataSource = new kendo.data.DataSource({
  transport: {
    read: {
      url: '/activity',
        contentType: 'application/json; charset=utf-8',
        type: 'GET',
        dataType: 'json'
    },
    destroy: {
      url: '/activity',
      type: 'DELETE',
      dataType: 'json'
    },
    update: {
      url: '/activity',
      type: 'PUT',
      dataType: 'json'
    },
  },
  schema:{
    model: activityModel
  }
});
 
$("#grid").kendoGrid({
  dataSource: dataSource,
  sortable: true,
  selectable: true,
  rowTemplate: kendo.template($("#rowTemplate").html()),
  altRowTemplate: kendo.template($("#altRowTemplate").html()),
  columns: [
    {field:"_id", title:"id"},
    {field:"date", title:"date"},
    {field:"activity", title:"activity"},
    {field:"hours", title:"hours"}
  ],
  change: function(){
    var selectedId = this.select().data("id");
    selectedActivity = this.dataSource.get(selectedId);
    console.log("selected id:"+selectedId)
    console.log("selected activity is:"+JSON.stringify(selectedActivity));
  }
});

When my change function is triggered, my selected id is undefined. My guess is that I have a misunderstanding somewhere in my data modelling or something of that nature.

Any hints would be appreciated, thank you very much!
Joel
Top achievements
Rank 1
 answered on 14 Jan 2012
0 answers
100 views
Hello,

congratulations for KendoUI, it's a very powerful library.
I'm using KendoUI Chart and I'd like to pass a custom Array to the tooltip so that every tooltip is different.
the model I use is
var data = {
    "Title": "Title of chart",
    "Series": [
        {
            "Name": "2015",
            "Values": [1.00, 0, 0, 2.00]
        },
        {
            "Name": "2016",
            "Values": [1.30, 0.5, 0.6, 2.50]
        }
    ],
    "XAxis":
        {
            "Values": ["20 févr.", "21 févr.", "22 févr.", "23 févr."]
        }
};

I'd like to add a new array to each Series, but I don't know of to reference it in the tooltip declaration ?
 tooltip: {
               ....
            }

Is it possible to do what I want ?
Thanks
Fab
Top achievements
Rank 1
 asked on 13 Jan 2012
1 answer
178 views
Hi.

Are there any public REST service integration examples. Utilization of all REST HTTP verbs GET/POST/PUT/DELETE and also fetch of individual data elements would be nice.

Br,
Timo Westkämper
Atanas Korchev
Telerik team
 answered on 13 Jan 2012
1 answer
66 views
Hi,
I'm using something like this:

<
div id="tabstrip">
<ul>
<li class="k-state-active">
Movies
</li>
<li>
Series
</li>
</ul>
<div>
<div id="gridMovies" />
<div>
Second Tab Content
</div>
</div>


With that, the content of the second tab is rendered at the bottom of the first tab after the grid.
When I change it to
<div id="gridMovies"></div> 
it works fine.

Is that because the document isn't valid ("XHTML 1.0 Transitional")   ?   
Is it necessary to be 100% valid?
Using IE9.

Thanks
Eric
Dimo
Telerik team
 answered on 13 Jan 2012
1 answer
96 views
just one bug report - in IE 9 when go one month back, slide animation is white... Pic attached.
Kamen Bundev
Telerik team
 answered on 13 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?