Hi,
I need to have multiple buttons inside a single grid cell. The buttons will be used to show a particular row in a child band. Taking an Order/Order lines example. I want the Orders table row to have a unbound column that will be dynamically filled with horizontal buttons for each Order Line row in that order. Looking at the image below, each of the 3 rows in the Order Lines column is a button that when pressed will expand the Order Lines child band that is filtered to show only that particular order line that was selected.
What I don't know how to do is:
Is this design even possible using existing editor controls?
Thanks
It is read-only. But you can override it on the derived button element class. :)
Everything works great Mike, but now when I'm trying to style the button it tells me that ButtonStyle is read-only.
buttonElement1.ButtonStyle = UIElementButtonStyle.Borderless;
No, you woud still do this in a CreationFilter. If you look at the code, it's just arbitrarily creating 3 buttons per cell. But there's no reason it has to be limited to 3. You can create as many buttons are you want and arrange them however you want.
The code in the CreationFilter gets a reference to the cell object. So if you want to get the child rows, you can easily do that using cell.Row.ChildBands["child band key"].Rows.
One thing you may want to do in the InitializeRow is set the Height of the row, so it has enough room to accomodate the buttons. You will probably also want to set RowSizing (on the Override) to Free to allow each row to have a different height. I would do this in the InitializeLayout.
Mike,
How do I go about dynamically controlling the number of boxes based on a child collection? I'm pretty sure I need to do it in the InitializeRow event and access the child collection and loop the button creation code.