Using …/samples/4_list/04_grouplist_complete.html as an example, could you show me how to conditionally execute different functions depending on the value of obj.ext?
I have a similar routine that uses xml as the data source with a property ‘entrytype’.
No worries - I put it into the value tag in the xml and then retrieved it using:
$$('menulist').item(id).value
… which doesn’t work either as the value of “value” changes when items are selected … help!
could you show me how to conditionally execute different functions depending on the value of obj.ext?
In this sample templateItem is defined by a function. You can use the same approach - in this function you can apply different actions depending on a certain item property.
… which doesn’t work either as the value of “value” changes when items are selected … help!
Item selection causes redrawing selected item. Please describe the issue in detail if my previous reply does not solve the problem
Not sure about that. If I modify the templateItem function as follows:
templateItem: function(obj){
dhx.notice({ delay: 750, message: obj.entrytype });
return "<div class='dhx_filelist_name'></div>"+obj.name;
}
then a message is displayed for every item in the list when a group is selected which indicates that it fires when the item is rendered, not selected.
I have the following function to direct program execution and want to extend it so that it can test for the value of obj.entrytype and redirect accordingly:
on: { 'onitemclick': function(id) { doRoutine1(id); }
So, I suppose my question is, how do I reference one of the properties of the XML source data in the onitemclick event?
Did it:
$$("mainMenu").item(id).entryType
can be tested in a switch statement in the onitemclick function to route execution.
Thanks anyway.