function loadTwitterFeed() { var dataSource = new kendo.data.DataSource({ transport: { read: { url: "http://api.twitter.com/1/statuses/user_timeline.json", // the remove service url dataType: "jsonp" // JSONP (JSON with padding) is required for cross-domain AJAX }, parameterMap: function(options) { return { screen_name: "USER_NAME", count: 10, since_id: options.since_id, //additional parameters sent to the remote service max_id: options.max_id //additional parameters sent to the remove service }; } } }); $("#twitter-feed").kendoMobileListView({ dataSource: dataSource, template: $("#twitter-template").text(), appendOnRefresh: true, pullToRefresh: true, //addition parameters which will be passed to the DataSource's read method pullParameters: function(item) { //pass first data item of the ListView return { since_id: item.id_str }; }, endlessScroll: true, //addition parameters which will be passed to the DataSource's next method endlessScrollParameters: function(firstOrigin) { if (firstOrigin) { return { max_id: firstOrigin.id_str }; } } });} $( "#grdTrading" ).kendoGrid( {
dataSource: grddataSource, // static data source
scrollable: true,
height: 180,
columns: [
"Code", "Level",
{
field: "Flag",
template: "#=Flag.Name#",
width: "150px",
editor: TradingDropDownEditor
}
],
editable: true,
sortable: true,
selectable: true
} );
function TradingDropDownEditor( container, options )
{
$( '<input data-text-field="Name" data-value-field="FlagID" id="Category" data-bind="value:' + options.field + '"/>' ).appendTo( container ).kendoDropDownList( {
autoBind: false,
change: function ( e )
{
var grid = $( "#grdTrading" ).data( "kendoGrid" );
var dataItem = null;
grid.select().each( function ( e )
{
dataItem = grid.dataItem( $( this ) );
var id = dataItem.Code;
var DropdownText = dataItem.Flag.Name;
alert( DropdownText );
if ( id == "ABC" && DropdownText == "No" )
{
//Adding dropdown to the second grid
AssociatedData = [{ text: "No", value: "No"}];
$( "#grdAssociated" ).find( "#ddlAssoPort" ).kendoDropDownList( {
dataTextField: "text",
dataValueField: "value",
autoBind: true,
enable: false,
dataSource: AssociatedData
} );
}
else
{
return;
}
} );
},
dataSource: ddlFlag
} );
}
I am able to add the dropdown but on change event if I select the dropdown it vanishes the the dropdown in the other grid.
Please look at the code and please help..!
Hi,
I am using the kendo grid with custom popup edit template and everything works fine until i use text area inside the template.
any html after the textare does not show in the edit popup template and
hence i cannot see the update and cancel buttons or any other field that
i declare after the textarea
Hi there, for some reason I can't force bubble chart to show legend, at the same time I'm able to see category name in the tooltip, could you please explain why, thanks.
$("#Chart1").kendoChart({
title: {
text: "Chart"
},
legend: {
visible: true,
position: "bottom"
},
dataSource: @{@Html.Raw(id)}ChartDataSource1,
seriesDefaults: {
type: "bubble"
},
seriesColors: ["#004D5C", "#FF8700", "#38A660", "#E5D843", "#80BF34"],
series:
[{
type: "bubble",
categoryField: "Field1",
xField: "Field2",
yField: "Field3",
sizeField: "Size",
colorField: "Color",
maxSize: 35,
minSize: 3,
visibleInLegendField: "true",
tooltip: {
visible: true,
format: "{2} {3}"
}
}
]
,
xAxis: {
//max: 1000,
labels: {
format: "{0}"
}
},
yAxis: {
//min: 80,
labels: {
format: "{0}"
}
},
});
$("#divGrid").data("kendoGrid").table[0].rows[0]. cells[0].children.ARadio; $("#divGrid").kendoGrid({ dataSource: { data: ds, pageSize: 5 } , pageable: { input: true, numeric: false } , selectable: true , sortable: true , scrollable: false, columns: [{ title: "A", template: '<input type="checkbox" id="ARadio" ARadio="#= RequestId #"/>' }, { title: "Requestor Name", field: "RequestorName", template: '<nobr><label style="width:120px;">#=RequestorName#</label></nobr>', width: 150 }, { title: "Request Type", field: "RequestType" }, { title: "Business Group", field: "BusinessSilo", template: '<nobr><label style="width:120px;">#=BusinessSilo#</label></nobr>', width: 120 }, { title: "Access Level", field: "AccessLevel" }, { title: "Access Justification", field: "AccessJustification", template: '<nobr><label style="width:120px;">#=AccessJustification#</label></nobr>', width: 150 }, { title: "Date Requested", field: "DateRequested" }, { title: "Date of Expiry", field: "ExpirationDate"}]});