Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Sorting on checkbox columns
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Sorting on checkbox columns

 Post Reply Post Reply
Author
Message Reverse Sort Order
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Topic: Sorting on checkbox columns
    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
Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post 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)
Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post 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)
Back to Top
atarba View Drop Down
Newbie
Newbie


Joined: 12 February 2007
Location: Romania
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote atarba Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.