Telerik Forums
Kendo UI for jQuery Forum
2 answers
256 views
I'm using the following code for my transport options of a kendo grid
transport: {
    create: {
        // get the rid off of the model object that
        // kendo ui automatically passes to the url function
        url: function () {
            return "/project/creategebouw/"
        },
        dataType: "json",
        type: "POST",
        contentType: "application/json; charset=utf-8",
        data: { Project: { Id: PID } },
        complete: function () { onCreateGebouw(); },
    },
    read: {
        url: function () {
            return "/project/FindAllGebouwen/"
        },
        dataType: "json",
        type: "POST",
        contentType: "application/json; charset=utf-8",
        data: { Project: { Id: PID } }
    },
    update: {
        // get the rid off of the model object that
        // kendo ui automatically passes to the url function
        url: function () {
            return "/project/editgebouw/"
        },
        dataType: "json",
        type: "POST",
        contentType: "application/json; charset=utf-8",
        data: { Project: { Id: PID } },
        complete: function () { onGebouwUpdate(); }
    },
With the read option, Project { Id : 2 } is neatly added tot the JSON data that is created through the parametermap (just a JSON stringify return) but this is not the case with the update option, why? is this a bug?
I tried putting the adding of the project id in the parametermap but I can't seem to get that to work, any examples?
Sachin
Top achievements
Rank 1
 answered on 25 Apr 2013
1 answer
276 views
I have several DropDownLists on a page that all have AutoBind = false and set to query a remote data source.

The results shown in each DropDownList will be dependent on values chosen in the other DropDownLists, therefore in the change event I want to "reset" all the other dropdownlists, so that if they have already been bound the next time they are dropped down they will requery the remote dataSource. 

I've managed to get the other dropdownlists to requery, but at the moment they all requery straight away, whereas I want them to wait until the user drops them down. 

Is there a way to tell a DropDownList/DataSource that it should be cleared/reset, but not rebind yet, rather using the same behaviour as AutoBind=False?
Alex
Top achievements
Rank 1
 answered on 25 Apr 2013
1 answer
153 views
Hello. I have implemented a ListView inside an expandable area of a grid row. The preview of the list inside the expandable area is working fine. The problem is when i go on the edit mode of the List and then press cancel.
After pressing the cancel button i am not allowed to expand the row anymore.  For your information, no error is thrown.

I have created a jsFiddle example that illustrates the problem.
To reproduce the behavior written above, go through the following steps:
1) Expand a row
2) Press on "Edit" button
3) Press on "Cancel" button.

After that you will notice that the row cannot be expanded again. Any suggestions ?

Thank you in advance
Nikolay Rusev
Telerik team
 answered on 25 Apr 2013
1 answer
266 views
We are trying to set specific date returns and reload the charts. Everything is working except that when the we call the chart.refresh or chart.redraw functions, the dataItem specified in the tooltip template is returning undefined. Would appreciate any help.

function updateDateRange(timelabel) {
  var prevDateRange = timelabel.text();

  var dateRange = new Date();

  switch (prevDateRange) {
    case "7 days":
      timelabel.text("30 days");
      dateRange.setDate(dateRange.getDate() - 30);
      break;
    case "30 days":
      timelabel.text("60 days");
      dateRange.setDate(dateRange.getDate() - 60);
      break;
    case "60 days":
      timelabel.text("90 days");
      dateRange.setDate(dateRange.getDate() - 90);
      break;
    case "90 days":
      timelabel.text("7 days");
      dateRange.setDate(dateRange.getDate() - 7);
      break;
  }

  var chart = timelabel.siblings(".widgetchart").data("kendoChart");

  chart.options.categoryAxis.min = dateRange;
  /* Note: For some reason, if the min value of the categoryAxis is set to a low enough  value (in my tests, less than 10 days from the current date), it rewrites the dataItem value in the tooltip template, causing it to throw a few undefined where dataItem properties are being accessed. Modifying other properties of the kendoChart data object does not cause it to break. */
  chart.redraw();
}

$("#" + id).kendoChart({
theme: "metroblack",
//autoBind: false,
dataSource: {
transport: {
read: {
url: url,
dataType: jsontype
}
},

schema: {
data: function(response) {
var data = response.data;

//remapping of data to match format
for (var i=0; i < data.length; i++) {
var item = data[i];
item.date = item.date;
item.value = item.engagement;
item.retweets = item.retweet_count;
item.replies = item.reply_count;
item.display = item.group_name;
}

return data;
},
model: {
fields: {
date: {
type: "date",
}
}
}
}
},
chartArea: {
opacity: 0
},
legend: {
position: "custom",
offsetX: $("#" + id).fromRight(100),
offsetY: 20,
},
series: [{
type: "line",
field: "value",
markers: {
border: {
width: 0
},
visible: true,
},
width: 2,
missingValues: "interpolate"
}],
dataBound: fillPoints,
categoryAxis: {
min: new Date().setDate(new Date().getDate() - 7),
baseUnitStep: "auto",
field: "date",
},
valueAxis: {
labels: {
format: "N0",
},
},
tooltip: {
visible: true,
// This item works the first time but every refresh, the dataItem is "undefined"
template: "<div style='text-align:center'>Retweets: #= dataItem.retweets #<br>Engagement: #= value.addCommas() #<br>#= category.toString('M/d') #</div>"
},
});
Hristo Germanov
Telerik team
 answered on 25 Apr 2013
1 answer
150 views
Hi,

I am using struts tags eg <s:textbox> and when I try to use the kendo validators in struts it does not work and I do not want to use <input type > tags as they are not shown properly on IE for my project but kendo validation works fine on them.

Kindly show me a workaround to use the kendoValidator in struts2.0 as the whole project is made using struts tag library and Its not very difficult to change to <input type>

Please help.

Regards and thanks in advance
Nitesh
Celinton
Top achievements
Rank 1
 answered on 25 Apr 2013
1 answer
90 views
Hi,
I'm trying to create the attached chart with Kendo UI. I'm having trouble with the stacked x-axis (categories).
The closest I've come is this fiddle, but obviously the categories aren't attached to the data.

Is it possible to achieve this with Kendo? Any direction would be appreciated.
Hristo Germanov
Telerik team
 answered on 25 Apr 2013
1 answer
165 views
I am attempting to convert my JSON data to a Kendo UI Mobile Listview. my php script outputs this data:

[{"eventID":"1","name":"test","time":"12:00:00","category":"####","subcategory":"####","description":"Event for testing purposes","locationID":"1","picturePath":"http:\/\/####\/~z3370257\/images\/1.jpg"},{"eventID":"2","name":"test2","time":"13:00:00","category":"####","subcategory":"SEIT","description":"Event for testing purposes2","locationID":"1","picturePath":"http:\/\/####\/~z3370257\/images\/1.jpg"}]


This JS Fiddle uses the same html css and javascript file that my app does. 

My question is, what do I need to put in my transport & read methods to get it to interpret the data correctly. 
Atanas Korchev
Telerik team
 answered on 25 Apr 2013
1 answer
275 views
Do you have something similar to this like the jquery mobile? im still debating if im going to use jquery mobile or your Kendo UI

http://view.jquerymobile.com/1.3.1/dist/demos/widgets/panels/

Alexander Valchev
Telerik team
 answered on 25 Apr 2013
1 answer
1.1K+ views
I have a situation where the activate event (or any tab event for that matter) does not fire when i programmatically select a tab. What i am eventually attempting to do is have my app perform a search on one tab and then populate the contents of the grid within another tab (Grid tab) and have that grid be 100% height of the tab.

Seems the grid only displays properly when the tab activate event fires (to resize the tab and grid). But its not in this case.

JSFiddle:

http://jsfiddle.net/jmika99/urYVe/1/

Thanks,
Ashley
Iliana Dyankova
Telerik team
 answered on 25 Apr 2013
1 answer
165 views
Hi Guys,


Since Our database is using AUS format date not US Format.I have added this in my cshtml page, but it is not working since when it pass to the controller it still get the US Date format.

my cshtml page is also inside the Kendo ui tab

i have placed the following in my cshtml page, however the controller still pick up US date format:

<script type="text/javascript" src="@Url.Content("~/Scripts/kendo/cultures/kendo.culture.en-AU.min.js")" ></script>
<script>
kendo.culture("en-AU");
</script>


Please advise
Daniel
Telerik team
 answered on 25 Apr 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
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
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?