Print Page | Close Window

Sorting on checkbox columns

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=6380
Printed Date: 19 September 2024 at 6:09pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Sorting on checkbox columns
Posted By: atarba
Subject: Sorting on checkbox columns
Date Posted: 12 February 2007 at 8:19am
Hi,

I'm setting up a report control column to just show checkboxes (for a logical field) but I do not set the value of the item to yes or no because I just want the checkbox in the column.
Is there any way to have sorting on this column without setting the value?

Thanks,
Andrei


-------------
Andrei



Replies:
Posted By: jcollier
Date Posted: 12 February 2007 at 3:03pm
Funny this just got asked today.  I also would like to know how to sort on checkbox columns.  The following code checks the box properly but trying to click the column name and sort does not do anything.

Set Item = Record.AddItem("")
Item.HasCheckbox = True
Item.Checked = CBool(!Doc)


Posted By: jcollier
Date Posted: 12 February 2007 at 3:19pm
Ok, I figured it out.  Just add the following line to the code I listed above.

Item.SortPriority = IIf(CBool(!Doc), 0, 1)


Posted By: sserge
Date Posted: 12 February 2007 at 3:25pm
Yes, you can. However, you'll have to use another property .SortPriority
Like:

Set Item = Record.AddItem("")
Item.HasCheckbox = True
Item.Checked = CBool(!Doc)
Item.SortPriority = CInt(!Doc)


--
WBR,
Serge



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net