Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
250
Useing GroupBy rows to display custom child UI control in 8.2
posted

Using Infragistics 8.2

Hello, All-

I've done some reading on using Creation and Draw Filters, but I need assistance with designing a solution for the following problem:

We have a grid of data with the following datatable schema:

Id, Name, Attribute1, Attribute 2, Score

The Score is a sort of calculated field based on several user-input fields, but none of these inputs are stored in the actual grid.

What we'd like to do is have the GroupBy knobs appear next to each row in the grid, but when the knob is expanded, we inject our own UserControl as the child UIElement that will fill up the space between the rows (while it is exapnded).  This child control will do some calculations and take user input and update the Grid's Score column based on user input.

So, the 2 main questions are:

1) How would I create the grid to show knobs (assuming using GroupBy functionality?) when the grid doesn't have any concept of aggregation that would cause multiple rows to group?  Would I just groupBy ID (ID will be unique) and so the summary row will show the knob and the default expand behavior will be to show the 1 row that has the Group ID?

2) Once I have the GroupBy functionality such that the rows have knobs that expand, would I use a creation filter or draw filter to halt the creation of the child UI elements, and create my own child which is my custom UserControl which takes the user input and modify's the grid's datasource's Score field?

I'm sorry if this is confusing, I'm trying to explain it as straight forward as I can, but if there's anything that i'm leaving out (due to ignorance of the WinGrid's GroupBy capabilities) please let me know and I'll try to fill in the blanks.  I purposely left out where the custom child UserControl will store and modify the User Input data because I do not want to confuse the core question about how to get GroupBy rows to show custom UI controls in their children. I think once i get that behavior nailed down, I can get the code to do the correct work about updating the datasource's Score field.

-Chris

 

Parents Reply Children