Telerik Forums
Kendo UI for jQuery Forum
2 answers
73 views
I've set up a datepicker like this...

    $(document).ready(function () {
        $("#timeshiftDatePicker").kendoDatePicker({
            max: "01/05/2012",
            min: "08/12/2011",
            value: "12/30/2011"
        });
    });

It displays the date correctly and limits the range correctly, but when I click on another date the value shown is something like "Tue Dec 27 2011 00:00:00 GMT+1000", not "12/27/2011". I originally thought it might have something to do with setting the culture to en-AU (I reversed my dates when that was set), but I've removed that and I still get the problem.
Adam Boddington
Top achievements
Rank 1
 answered on 16 Jan 2012
3 answers
321 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
612 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
976 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
112 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
54 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
352 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
104 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
184 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
70 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
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
Chat
DateRangePicker
Dialog
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
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?