Grid Events not firing

I’ve got a grid that is bound to a custom dataview and is loaded from a function called by a button click. The data populates fine and now I want to display some other data in another grid based on the row that is selected in the first grid. But when I select different rows in the grid, no events are firing. There are some javascript errors that look like below, but nothing else.

I do have selectors enabled for the grid, not sure if that would hinder events from being called. Even if I select a checkbox, an event doesn’t fire. Has anyone experience this?

:thinking: Can you show your row_change event (which isn’t firing)?

There is no row change event. I didn’t change the row, I’m just trying to select different rows.

I guess I’m not following then. What events are you expecting to see fire?

Is there not a row selected or row changed event based on the current active row? In the classic forms, this was available. You could get the current selected row and you could hook an event when the selection changed.

Changing the active row, yes. But you have to build that event. It would have a trigger of DataView > Row Changed.

I don’t think there is any event triggers for selection change.

Could try binding a field as a selection column, then listening for change events on that field. Haven’t tried it, but sounds plausible.

I’d be interested to know what shift click would do if it does work.

So how would anyone bind one grid to another linked by a field? Say grid 1 has part number and related info and grid 2 has on hand qty info. As you select different parts in grid 1, each time your selection changes, grid 2 would change or filter based on the part number in grid 1. This is standard in Epicor classic in dashboards (publish/subscribe) and obviously you can do this in classic.

Oh wait, I think I remember now. I think I have to set the client filter on the second grid to a field in the first grid which acts like a selection event filter. I’ll have to try that later today…

Your child grid is going to be populated by a BAQ or rest call to a BO method. So in your row-change event, you would then perform an erp-baq (or rest-kinetic if you’re using a BO) using the parent’s dataview.column as the parameter in that call.

So, changing the row in the parent grid triggers the event, and the part number in that newly selected row is then used as the parameter to filter the child grid.

Yeah but there is no row-change event occurring. That is what I’m trying to say.

In regards to my post about the client filter

Thinking on this, I don’t want to do this solution using a client filter because the dataset for the second grid would be too large. Really need to tee off a row change and get the part of the first grid as it’s being selected through the checkbox and/or just clicking on the row that makes it active.

Right…

It’ll look something like this:

whatever dataview your parent grid is bound to… when the selected/active row changes… it will fire your kinetic-baq (or again, you can do a rest-kinetic here, instead, if you’re using a BO rest call to populate your child grid).

I guess I didn’t make myself clear. I already did that. The event is not firing at all. Not for row-changed or changing. I also tried tying off the data table as well.

Can you show your parent grid model and what dataview its tied to… and the event you’ve built?

Okay… so in debugger… you don’t see the events fire. Do you see any other events firing?

Sorry to ask… are you turning debug logging on?

(CTRL+Alt+8)… or typing epDebug.toggleMetaFxLogging into the console

image

One of my favorite things to do is turn this on right away by doing a console-write before i could even interact. like below:

Yes debugging is on and no I don’t see the row change events firing. I know some events are firing because as the grid loads, I update a calculated field in the dataview and I see those events firing.

Below is the last of those events. The grid loads fine and when I click a row those errors pop up you see below. Also, a separate issue, I set the selection checkboxes to true and I have to click the select all checkbox like three or four times for them to uncheck. I do this as test in case the user needs to do it and I would think they would find that annoying as hell… But I guess that would be a different thread.

Are you clicking with a mouse, or using the keyboard?
The keyboard will not fire events.