How to set data table row as on click event?

Hey guys. I have a little problem here. I have a shopmenu widget, full with buttons, each button represents a row in the data table. In an other widget i have a window to display all the info about that row. Now i have to set the row for the desired information but can i set the row depending on what button i click on in the shopmenu? how to set the row from an other widget?

How to set data table row as on click
event?

You cannot. Data Tables are read-only. They’re not data bases.


Do note the DT is using a struct - that’s the row. You can create new ones and store them in an array, send the array to the Save Game object, and then save that object to disk.

If i call the row, it fills up the pop up window for the item with the desired info. i just cant switch between the rows for different button click.

the window i call is in an other widget…

The question is asking about Setting Data Table rows - you cannot do it in BPs.

Do note that set in this context means to write to the Data Table.


If you have an unrelated issue with communicating between blueprints, consider posting a new question. But do describe in detail who is communicating with whom, what’s the end goal / purpose and how those entitles end up in the world.

Atm, you’re saying A needs to talk to B - we know nothing about your project, how you set things up and what needs to happen. And there are dozens of ways to set up communications depending on a lot of factors.

Perhaps look up those topics:

  • direct communications
  • event dispatchers
  • interfaces

These are the communication methods in UE4. Choosing one would depends on what’s needed.

If i call the row, it fills up the pop
up window for the item with the
desired info. i just cant switch
between the rows for different button
click.

For example, this means so little. What is ‘different button click’? How is it different?

  • next click of the same mouse button
  • a click of another mouse button
  • or perhaps they’re not mouse buttons at all but widget buttons

These are the rows, how do we know what is the next request:

338704-screenshot-2.png

Are your rows names or numbers?

So heres the deal. Im making item descriptions as widget button on click events. I have a widget for the items and i have a different widget for the description window. On the first picture i set the row from the data table on each button, on the second picture i have set up the description panel for a row. And thats the question. Can i somehow set the row on the second picture depending on what button i click on in the first widget? I think not but maybe.

So heres the deal. Im making item descriptions as widget button on click events. I have a widget for the items and i have a different widget for the description window. On the first picture i set the row from the data table on each button, on the second picture i have set up the description panel for a row. And thats the question. Can i somehow set the row on the second picture depending on what button i click on in the first widget? I think not but maybe.

Ok, so we’re not setting values in the Data Table. Your question is really misleading :slight_smile:

Can i somehow set the row on the
second picture depending on what
button i click on in the first widget?
I think not but maybe.

It 'd be easier to keep both in the same widget, but if you must do it this way, sure:

  • clicking a button in the first widget fires a custom event in the second widget

You could create a custom dispatcher that carries pertinent data, so you do not need to access the DT twice. There’s a lot ways you can send that data across. You could give the first widget direct access to the second, or even have the 1st one create the 2nd…

Ty Sir! Youre the best!