Mattersphere Developers Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Go down
avatar
Heather@FootAnstey
Posts : 57
Join date : 2018-12-19

Present Booleans nicely in a Search List Empty Present Booleans nicely in a Search List

Fri 17 Apr 2020 - 13:57
Original Post: Joe Green 05/10/2012 10:19:02

"Hi all,
I've got a Search list which returns a couple of Boolean columns. I'm currently converting these to the text “Yes” and “No”, but I was wondering if there was a nicer way of rendering boolean values in a search list, ideally using tick\cross icons (as far as I can see, I can only add an icon to the first column), or rendering as a checkbox perhaps.
Is there anything I can do about this...? Cheers,
Joe"

Responses:

Richard Annison 08/10/2012 09:24:11

"Hi Joe,
I've asked around and this is not possible sorry. Regards
Richard"

Phil 08/10/2012 15:50:58

"Hi Joe,
Don't know if this will help but you can use Unicode Symbols in SQL i.e. if you know the number then you can put in the Decimal version of the number into the NCHAR() function in sql and it outputs a picture below are a few you might be interested in.
Select
NCHAR(9746) 'Ballot box Cross', NCHAR(9745) 'Ballot box Tick', NCHAR(10003) 'Tick', NCHAR(10004) 'Bold Tick',
NCHAR(10005) 'Straight Cross', NCHAR(10006) 'Straight Bold Cross', NCHAR(10007) 'Cross',
NCHAR(10008) 'Bold Cross'


See these wiki links for more symbols : - http://en.wikipedia.org/wiki/Dingbat http://en.wikipedia.org/wiki/Miscellaneous_Symbols Thanks Phil"

Joe Green 09/10/2012 12:22:04

"Thanks Phil, we kind of half joked about trying to use WingDings for this somehow!
I've used a couple of the symbols below and actually it renders OK, so we're gonna push that into test and see what the uses think. Thanks for taking the time to post - much appreciated.
Joe"

Phil 09/10/2012 12:41:42

"Glad it helped.
I liked your idea, search lists are sometimes very bland, shame we cannot override the Render event of the cell or something.
I've been doing some more playing with the code and you can change the colours of the font and background too, so that might make the Ticks and Crosses a bit more visible or pleasing.
The code is in the “Create Search Lists” Document Page 48 but here is a snippet of what I've just been playing with. protected override void BeforeCellDisplay(object sender, FWBS.Common.UI.Windows.CellDisplayEventArgs e)
{
if(e.ColumnName.Equals(“ColumnName”))
{
e.BackColor = System.Drawing.Color.Green; e.ForeColor = System.Drawing.Color.White;
}
}
protected override void Initialise()
{
this.EnableBeforeDisplayCellEvent = true;
}
Cheers Phil"



Back to top
Permissions in this forum:
You cannot reply to topics in this forum