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
I threw together a quick sample of doing this with a CreationFilter.
The simplest option would be to use a column for each button.
But if that's no good and you really must have multiple buttons in a cell with no text, then you can acheive this with a CreationFilter. It would be a bit tricky, as you would have to derive your own ButtonUIElement class and replace the existing elements in the cell with a series of buttons that are somehow identified and fire events you can handle.
If yuo want to try that, I recommend that you check the Infragistics Knowledge Base for articles and samples on CreationFilters. Also, get the Infragistics UIElementViewer Utility. This utility is a big help when working with UIElements.
You can put an individual button to fill a whole cell, which is most easily done by setting the column's Type to Button. I don't myself know of any way to put multiple buttons into a cell in a top-to-bottom fashion, however. You may want to submit a feature request here so that we can evaluate putting this functionality into a future release of the product.
Mike Saltzman provides some information about putting multiple buttons in a cell in this post:http://forums.infragistics.com/forums/p/1291/11787.aspx#11787
If you want to show different buttons in different cells in the same column, then you'll need to set a individual edtior control for each cell, rather than just one for the column. In an ideal situation, if you have a finite number of button combinations (for instance, you'll only ever show no, one, two, or three buttons), then you can create a single editor control for each such combination, and connect your cells to those editors on an as-needed basis.
Off the top of my head, I don't recall whether it's an event on the grid or an event on the editor that's raised when you click these editor buttons.