I need help trying to add filtering to an Image column. See include picture. In the Available Options column you can see three different Images. Well OK, it looks like two. But there are three, two of which I have combined via code to be able to display in one grid cell. I need a way to filter based on the images.
To give a little more background. The image represents an action that can be taken. So for the include picture: orange plus mean Force approve, the red X means Reject, and the other means Revalidate. The users want to be able to filter by these values as well as Blanks and NonBlanks. The grid does also currently maintain hidden Boolean columns that represent these values.
Is there a way to add a filter to the Available Options column of the grid and if so, how would I go about it?
Hi,
What's the DataType of the column? Is this an Image or Bitmap column? Or is there a numeric value in this column and you are using the Appearance to set an image?
I assume this column is not editable by the user, and that the images displayed are calculated based on some other value or values in the row. Is that right?
The datatype is Image and is not editable by the user. Within the row there are boolean values that determine if an image is displayed and if it is gray scaled.
For example:The Force Approve Image(orange color) displays if the ForceApproveShow value is True. ForceApproveShow of False then ForceApproveAllow is taken into account.ForceApproveAllow of True would Gray scale the image. If both ForceApproveShow and ForceApproveAllow are false the image will not display.If more then one image is set to Show, gray scaled or not, then the images are joined together to make one image to put in the cell.
Hello again,
I've put together a sample that shows the problem. I will attach it to this post. It has 2 tabs, both showing the issue. I wanted to make sure the problem was the same when I used the designer and also when I didn't because in our app we didn't use the designer for these grids in question. When you run the app, do this:
1. Filter on the image column. Note that it filters fine.
2. Click the filter icon again in the column header. Note that your previous selection is not set.
Thank you for your time,
Dustin
Hi Dustin,
I looked into this and the problem is that the grid doesn't know how to deal with your custom filter condition type.
The grid doesn't store which items you checked on the list - it can't because the same list may be used for multiple columns. So what is does is it examines the FilterConditions on the band and tries to match them up with what's on the list when you drop it down.
In this case, it can't do that. The grid cannot possibly know what you are doing in your MeetsCriteria method, so it doesn't know how to match up the filter conditions that exist for the column with that's on the dropdown list.
I don't see any way to handle this with the setup you have here. But this seems to be something of an oversight, and I'm thinking we could probably fix this by adding a new event to the grid that queries you with the item in the dropdown and the FilterConditions and let's you make the decision about what matches up. So I'm going to forward this thread over to Infragistics Developer Support and ask them to create a case for you and write this up as a bug for developer review.
I notice that you are using v10.1, though. That version is retired. So if this is fixed, it will only be fixed in the latest version.
Hi Mike,
Thanks for the explanation. I have a workaround that will work well enough for our situation. It's really helpful to know that the way I was trying wasn't going to work.
Regards,Dustin
Dustin,
I've created CAS-112877-J8Y2B9 for this issue. I've also submitted a development issue for it. You will be updated through the forum and the case when I have more information.
Great, thanks. I'll keep an eye out for the notifications. We've worked around it for now, but if this is changed to work the way we were hoping then we'll switch to whatever you give us.