help please, not show all events, just 12 of 70 events. first add node --->dp.resources.push this works fine, second
add events but just add 12 events.... then show console ---->alert(dp.events.list[g].resource + " - " + dp.events.list[g].text + " - " + g); and it show all events but in the schedule not see all what can I do?
$('#dp').val("");
dp.startDate = $('#hiden_inicio').val();
dp.days = 366;
dp.scale = "Day";
dp.timeHeaders = [
{ groupBy: "Month", format: "MMM yyyy" },
{ groupBy: "Cell", format: "d" }
];
dp.dragOutAllowed = false;
dp.allowMultiSelect = false;
dp.bubble = new DayPilot.Bubble();
dp.resourceBubble = new DayPilot.Bubble();
dp.rowHeaderColumns = [
{ title: 'Actividades', width: 150 }
];
dp.treeEnabled = true;
dp.rowHeaderScrolling = true;
dp.autoWidth = true;
dp.progressiveRowRendering = false;
dp.resources = [];
dp.update();
dp.heightSpec = "Max";
dp.dynamicLoading = true;
dp.durationBarVisible = true;
dp.durationBarMode = "PercentComplete";
dp.events.list = [];
dp.update();
$.ajax({
url: "../../Handler.ashx?tip=areagroup&ip=" + $('#id_proy_tab').val(),
contentType: 'application/text; charset=utf-8',
type: "POST",
cache: false,
async: true,
dataType: "text",
success: function (json) {
var datamk = json.split('|');
obj = JSON.parse(datamk[1]);
// alert(obj.length);
for (var i = 0; i < obj.length; i++) //The json object has lenght
{
dp.resources.push({ name: obj[i].area + " - " + obj[i].seccion, id:"a"+ obj[i].id });
}
dp.update();
for (var g = 0; g < obj.length; g++) //The json object has lenght
{
e = {
start: $('#hiden_inicio').val(),
end: $('#hiden_ffin').val(),
id: DayPilot.guid(),
text: obj[g].seccion,
resource: "a"+obj[g].id,
moveVDisabled: true,
moveHDisabled: true,
complete: 20
};
dp.events.list.push(e);
alert(dp.events.list[g].resource + " - " + dp.events.list[g].text + " - " + g);
}
dp.update();
// dp.events.add(e);
},
error: function (jqXHR, exception) {
alert("Error al Consultar !!");
}
});
dp.eventMovingStartEndEnabled = false;
dp.eventResizingStartEndEnabled = false;
dp.timeRangeSelectingStartEndEnabled = false;
dp.init();
dp.scrollTo($('#hiden_ffin').val());