Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Getting checkbox value in a datawindow Clicked Event

2,397 views
Skip to first unread message

Howard Purchase

unread,
Apr 22, 2004, 4:06:09 PM4/22/04
to
Hi, I thought this would be easy, but after several hours I just can't get
it.

I have a datawindow with a checkbox (column of checkbox edit style) on
it...and if I click the check box I want to copy some data for the current
row to a listbox. This part is no problem as I have taken care of it on the
clicked event.

Next ... if a checkbox is unchecked I want to remove the data from the
listbox.

My problem is ... I can't figure out how to get the current value of the
checkbox in the datawindow in order to add or delete from the listbox. I
have tried using the Describe method but I keep getting an empty string.

Any ideas?


Thanks in advance,

Howard
how...@roadrunner.nf.net


Brad Moore

unread,
Apr 22, 2004, 4:10:08 PM4/22/04
to
How about GetItemXXX? GetItemNumber() would do it if the data type of the
checkbox is a number.

Better yet though, don't use the clicked event at all. Use the ItemChanged
event in the datawindow. The new value is in the "data" argument as a
string. If checked = 1 then data will be "1". If it's 0 data will be "0".

Brad

"Howard Purchase" <how...@roadrunner.nf.net> wrote in message
news:408825ad$1@forums-2-dub...

DT

unread,
Apr 22, 2004, 4:10:43 PM4/22/04
to
you should code this in the itemchanged event, not the clicked event. When the
value of the checkbox is Y, add the data, value is N, remove the data.

"Howard Purchase" <how...@roadrunner.nf.net> wrote in message
news:408825ad$1@forums-2-dub...

0 new messages