Is there a way to group all validation information (business rules) that a row has violated and display them in a row below the row.
I can have a exception column styled' as image button. On click of that button, i should show the single row that lists all the business rules that have been violated. The idea is to consolidate all information and display it to the user instead of throwing message boxes.
Like this..
There's nothing built-in to the grid to do this, but there are a number of ways you might acheive what you are describing, or something similar.
One way you might consider is using the RowAutoPreview feature. Basically, what you would do is set the AutoPreviewField on the band to a hidden, unbound column. Then you set the value of the cell in this hiden column to the error text you want to display. For most rows, where the value of the hidden column is null, nothing will display. But when you assign a value, it will show up under the row.
Thanks for the update Mike. I have some trade-off.
1. Can i make the AutoPreviewEnabled for only one row instead of the entire grid and can that happen on a button click in the grid cell?
2. Can i format the AutoPreviewEnabled row to make it look like another grid?
3. If i go for a hierarchial grid, can i make the hierarchy available only for the column that i want? Usually it links the entire row and data is displayed for that. I need it like this..
4. If i have a list view with all the exceptions, can I show it in the grid as a row.
Thanks,
viswanth said:1. Can i make the AutoPreviewEnabled for only one row instead of the entire grid and can that happen on a button click in the grid cell?
Yes and no. You have to turn the feature on for the whole grid. But you could use an Unbound column as your AutoPreviewField. If the column is empty, then the AutoPreview will not show up. So you can essentially turn the AutoPreview on and off for any particular individual row by setting the value of the preview field cell in that row.
viswanth said:2. Can i format the AutoPreviewEnabled row to make it look like another grid?
No, not easily. You could use a DrawFilter or a CreationFilter to do this, but it would not be trivial.
viswanth said: 3. If i go for a hierarchial grid, can i make the hierarchy available only for the column that i want? Usually it links the entire row and data is displayed for that. I need it like this..
If you added a child band, you could use the band's Indentation to shift it over. But lining it up with a particular column would be very complicated, I think.
viswanth said:4. If i have a list view with all the exceptions, can I show it in the grid as a row.
No, there's no difference between showing a second grid within a grid and showing a ListView in a grid. Neither is supported.