Hi All, I am using UltrWinGrid and i am binding it to a datasource. Now some of the values in the datasource has a special character "^". I don't want to show that special character. I can loop through each row in the data grid and remove that special character. But it could be a overload as the number of rows are more. So i am just wondering if there is some other way of doing it through some function/properties in the win grid whild binding the data itself.
Thanks in Advance,
Manikandan
Hi Manikandan,
If you actually want to strip these character out of the data, then I would recommend using the InitializeRow event of the grid, rather than looping through the rows. It will be more efficient.
If you don't want to alter the data, but you just want to update the grid display, then you could do this with a DrawFilter.
Hi Mike,
Thanks for your reply. How could i use the DrawFilter property?
Is it like doing custom painting?
Thanks and Regards,
Manikandan,
Yes a DrawFilter allows you to intercept the painting of certain UIElements in the grid. Actually, you might get better results with a CreationFilter in this case.
DrawFilters and CreationFilters are not simple, though, and it would be tough to describe here in a forum post. I recommend searching the Infragistics KB for articles and samples of CreationFilters.
Also, get the Infragistics UIElementViewer Utility. It's a big help when working with UIElements.
The basic idea here is that you would find the UIElement that is displaying the Text and then either use a CreationFilter to modify the Text property (this may not be possible depending on the element) or use a DrawFilter to draw the text yourself.