or
var
$tabs = $(
"#tab"
);
$tabs.kendoTabStrip({
animation: { open: { effects:
"fadeIn"
} },
contentUrls: [
'index.cfm?action=search_events'
,
'index.cfm?action=search_requests'
,
'index.cfm?action=search_documents'
]
});
// use this to handle auto-increment for new rows
var current = -1;
function onChange(e) {
if (e.action == "add") {
var item = e.items[0];
item.ID = current;
current -= 1;
}
}
// ID = -1
var item = dataSource.get(ID);
// UID = undefined because the UID was generated thinking it was an ID of 0, not -1
var uid = item.uid;