I'm sure this is really easy to do but I can't find the right search criteria to point me in the right direction !We have an ultragrid bound to a data view. It's then got some additional unbound columns added to it. These additional columns then have image resources set to values that are displayed on the InitializeRow event. We can successfully sort by this column by clicking on the column header so I'm happy that it has some kind of value associated with the cell.
For the bound columns we get filters created on each column but for the unbound there isn't anything.
How do we add a filter to the unbound columns to filter the rows ? Ideally this filter would show the actual images that are being displayed.I don't mind if this is done at design-time or at run-time.cheers
Andy
Hi Andy,
Thank you for posting in our forums!
What do these images represent? Will each row have a unique image? There may be a better way to represent this information in the grid rather than "filtering by an image."
Could you provide an example of the code you are using to create the images in the column so I have a clearer idea of how sorting is working?
Looking forward to hearing from you.
Hi Michael,
Thanks for the swift reply. The cell images are being created in the InitializeRow event of the grid.
If jobUrgent Then e.Row.Cells("Urgent").Value = Global.Merlin.ProductionUI.My.Resources.Resources.Urgent e.Row.Cells("Urgent").ToolTipText = "Urgent"End If
There's a load of other images that are displayed in other columns that are dependent on data that isn't displayed in the grid as well as some rows being highlighted in colours as well.Cheers
Thank you for the code.
It may be best to filter by a hidden column that represents the image rather than filtering by the image itself. Then, you can use a DrawFilter to display the image in the filter row.
If you need more complex functionality, it would be best to suggest what you need as a new product idea.
After investigating this and doing some research, this has been determined to be a product idea. You can suggest new product ideas for future versions by emailing ideas@infragistics.com.
Submitting your idea will send it directly to our product management team so that it can be imported into our new ideas community once live: http://ideas.infragistics.com.
Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case. You can also link back to this thread for additional details.
Thank you in advance to submitting your product idea.
the images are just coloured blobs that nominally map to a bit value coming from a database. But some of them depend on more than just being a bit value (for example) we have "On Hold" which is a Red circle, "Off Hold" which is a Green circle and "not on hold and has never been on hold" which is just a blank cell. So that Cell display is based on two bit values and clicking on the cell will cycle between blank > Red > Green > Red > Green etc., (as once it's been on hold it can never be "never on hold").Other blobs are just straight bit values.Technically I could data bind these with a bit of re-work (I've picked up another developers work on this) and perhaps use as has been previously suggested a custom editor. But I still need to be able to filter on those columns (or equivalent) by using the column filter as "normal".
If I used data-bound with a custom editor (the editor shouldn't do anything other than display and let me click on the cell to change the underlying value) would that be sufficient ?
thanks
Yes, using a custom editor sounds like it will do the trick in that case.
If you have any further questions, please let me know and I will be glad to help.
Additionally, I would like to let you know that I will be out of the office on Sept. 1 through Sept. 4 and I will review any updates on Sept. 5 and respond to you then.