Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • Hirn
    replied
    Hi Blama
    this is not exactly what I need. I use should Save Value and storeValue() to display buttons in my component, and I need a handler for selecting these buttons.

    Leave a comment:


  • Hirn
    replied
    I don't have a SelectionChanged handler. But you correctly noticed that I have an array of buttons and there is an onClick handler for them. So I wanted the SelectionChanged handler to be called from it.

    Leave a comment:


  • Blama
    replied
    Hi Hirn,

    please have a look at the CanvasItem main docs.
    I think shouldSaveValue:true plus a call to storeValue() is what you need.
    change(d) handlers on the item itself as well as on the DynamicForm should fire then.
    Like you say, this is not related to ListGrid at all, so the use of the word onSelectionChanged is very misleading.

    Best regards
    Blama
    Last edited by Blama; 24 Oct 2023, 21:44.

    Leave a comment:


  • Isomorphic
    replied
    Sorry, we’re not following what you want here. There’s no ListGrid but you want SelectionChanged to fire.. from where exactly?

    What would it simplify? You have your array of buttons, each with a click handler presumably, so if you need to run some logic in response to a button being clicked, it’s nearly a one-liner to do that.

    Leave a comment:


  • Hirn
    replied
    The thing is, I don't use ListGrid in any way, but my component is very similar to TileGrid. Which I had to abandon due to the inability to use AutoFit for items.
    But I would really like to use OnSelectionChanged, because it would make further development much easier for me.


    Click image for larger version  Name:	Zwischenablage-3.jpg Views:	0 Size:	12.7 KB ID:	271193


    Click image for larger version  Name:	Zwischenablage-2.jpg Views:	0 Size:	55.5 KB ID:	271195
    Last edited by Hirn; 24 Oct 2023, 20:50.

    Leave a comment:


  • Isomorphic
    replied
    SelectionChanged is an event related to ListGrids, and you haven’t mentioned how a ListGrid is involved here.

    If you take a look at the CanvasItem samples you can see how you can contribute values to the surrounding form.

    Leave a comment:


  • Hirn
    started a topic Custom CanvasItem and onSelectionChanged

    Custom CanvasItem and onSelectionChanged

    I wrote a custom TileListItem element in which I use FlowLayout with a lot of buttons. What should I do so that when the button is clicked, the OnSelectionChanged event handler is called.

    I looked in Telegrid how the OnSelectionChanged event handler is registered, but I didn't find how to call it.
    Last edited by Hirn; 24 Oct 2023, 01:11.
Working...
X