Question

Last detail records always missing from array

Can anyone advise what function or how I am supposed to access the last selected row? I am using the SelectedRows function but it always gives me everything except the last one I selected, and the ActiveRowfunction always gives me one of the items from the SelectedRows array.

 

I am also not sure what function to use to distinguish between having selected only one row (without checkboxes), or multiple with checkboxes. this.get("multiSelect") always seems to return Undefined.

 

Thanks very much.

Like 0

Like

3 comments
define("UsrSchema00abbfacDetail", [], function() {
	return {
		entitySchemaName: "UsrManifestStops",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/,
		messages: {
    		"Message1": {
        		mode: this.Terrasoft.MessageMode.PTP,
        		direction: this.Terrasoft.MessageDirectionType.PUBLISH
    		}
		},
		methods: {
			onActiveRowChange: function(buttonTag, primaryColumnValue) {
				console.log("**********onActiveRowChange BEGIN**********");
				console.log("multiselect: "+this.get("multiSelect"));
				console.log("SelectedRows: "+this.get("SelectedRows"));
				console.log("ActiveRow: "+this.get("ActiveRow"));
				console.log("rowSelected: "+this.get("rowSelected"));
				console.log("**********onActiveRowChange END**********");
			},
			rowSelected: function() {
					console.log("**********STOPS rowSelected START**********");
				    console.log("multiselect: "+this.get("multiSelect"));
				    console.log("SelectedRows: "+this.get("SelectedRows"));
				    console.log("ActiveRow: "+this.get("ActiveRow"));
				    console.log("rowSelected: "+this.get("rowSelected"));
					console.log("**********STOPS rowSelected END**********");
 
				}
		}
	};
});

 

Hello,

 

You need to use something like this:

rowSelected: function(primaryColumnValue) {
					this.callParent(arguments);
					console.log("SelectedRows: "+ this.get("SelectedRows") + " " + primaryColumnValue);
				}

since rowSelected: function(primaryColumnValue) is the correct funciton declaration and also parent method realization should be called.

 

Best regards,

Oscar

Oscar Dylan,

Thanks very much.

What about when an item is unselected? Is there a function for that? Sorry but I have not found anything on this in the Academy.

Show all comments