acitree


Get parent Id on checked unchecked event in aciTree


I want to ask a question that how can i get the parent id of child node in aciTree. If uservchecked the child node then i want to save its id with its parent id.
Any help in this regard will be highly appreciated.
I have gone through aciTree documentation http://acoderinsights.ro/source/aciTree/documentation.html# but didn't found any method to get the parent id on child selection.
if (eventName == 'checked') {
if (bankUsers.indexOf(api.getId(item)) == -1) {
if (api.getId(item) == -2 || api.getId(item) - 3) {
bankUsers = new Array();
bankUsers[0] = api.getId(item);
} else {
bankUsers.push(api.getId(item));
}
}
} else if (eventName == 'unchecked') {
if (bankUsers.indexOf(api.getId(item)) != -1) {
if (api.getId(item) == -2 || api.getId(item) - 3) {
bankUsers = new Array();
} else {
bankUsers.splice(bankUsers.indexOf(api.getId(item)), 1);
}
}
}
you can use this function :
var parentID = api.itemData(api.parent(item)).id;
as simple as this.
if .id give undefiend you can use the following:
var parentID = api.getId(api.parent(item));

Related Links

How to get children in Acitree
Get parent Id on checked unchecked event in aciTree

Categories

HOME
xcode
freeradius
opencv-python
redmine
activex
kivy
biztalk
elisp
qooxdoo
greasemonkey
video-streaming
javafx-8
gtk
lda
twitter-oauth
amazon-emr
chromecast
jquery-select2-4
stimulsoft
trace32
corona
asp.net-core-1.0
bnf
pygobject
salt-cloud
http-authentication
deepfreeze
bazaar
error-logging
android-permissions
jstree
router
cellular-network
multi-dimensional-scaling
list-comprehension
miniprofiler
bitbake
publishing
rust-cargo
mongoengine
transform
xerces-c
spinner
cargo
tidal-scheduler
spongycastle
qvtkwidget
libreoffice-writer
nothing
beeline
nusoap
sharpdx
android-webservice
zend-server
bpms
portal
mathjs
bilinear-interpolation
spring-mongo
wicked-pdf
fdt
utf-16
flipclock
currency-exchange-rates
seadragon
m4
boost-proto
perceptron
directx-9
ambiguity
asp.net-web-api-helppages
libz
swagger-maven-plugin
android-handler
darwin
python-curses
debug-symbols
sql-processor
igor
quantify
loginview
prism.js
forceclose
accountmanager
django-settings
xsd2code
insertonsubmit
mp4parser
ckeditor.net
multiple-dispatch
thejit
uitextfielddelegate
prefuse
litespeed
drawimage
radscheduler
filelock
solandra
icicles
autobench
stretchblt
acceleration
community-server

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App