compactframework >> ListView Checkboxes

by Jeff » Fri, 16 Apr 2004 00:50:49 GMT

Hi -

I'm using a ListView with Checkboxes in a SmartDeviceApplication. The items
and checkboxes display fine, but I'm having a problem with checking/clearing
the checkboxes.

Tapping on a checkbox checks/clears the checkbox as intended. But tapping
on the same checkbox again doesn't have any effect. Tapping a third time
does what the second tap should have done. (The second tap should reverse
the effect/status of the first tap.) Note that the problem does not occur
for Windows (non-CF) applications.

Am I missing something? Is this a bug? How can I get the listview
checkboxes to behave properly??

Can anyone suggest a workaround? Or must I tell my users to just keep
tapping until (a) the item is selected/cleared, or (b) they crack their
screen in frustration?

Thanks for your help.

- Jeff



compactframework >> ListView Checkboxes

by Mike » Fri, 16 Apr 2004 11:08:08 GMT


ListView checkboxes work for me. You have to tap on the box or the text
next to it.



items
checking/clearing

compactframework >> ListView Checkboxes

by Jeff » Sat, 17 Apr 2004 03:07:35 GMT

Thanks, Mike -

I think the problem I ran into was more of an emulator latency problem than
a listview problem. (I had been testing using the emulator.) Listview
checkbox behavior seems much more acceptable on a device (iPAQ 2215) than on
the emulator. In fact, it seems to behave as I think it should even on the
emulator, _provided_ that I wait about 4-5 seconds between taps/clicks!

- Jeff






tapping
time
reverse
occur

compactframework >> Listview Checkboxes

by Scott Toney » Thu, 28 Jul 2005 02:01:52 GMT

I have a listview control with checkboxes. Is there anyway that I can keep
it from "checking" / "clearing" the checkboxes when I click on the text,
make the user click on the checkbox?

Thanks
Scott

compactframework >> Listview Checkboxes

by Daniel Moth » Thu, 28 Jul 2005 02:17:48 GMT

See if the Activation property of the ListView helps you (play with
different values).

Cheers
Daniel

compactframework >> Listview Checkboxes

by Scott Toney » Thu, 28 Jul 2005 02:46:43 GMT

Great, now how about knowing when the user changes the checkbox?

compactframework >> Listview Checkboxes

by Daniel Moth » Thu, 28 Jul 2005 03:13:18 GMT

How about using the documentation or at least intellisense (if not the
properties window in C# or the dropdown combobox in VB)?
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWindowsFormsListViewEventsTopic.asp

The ItemCheck event looks promising...

Cheers
Daniel

compactframework >> Listview Checkboxes

by Alex Feinman [MVP] » Thu, 28 Jul 2005 03:17:34 GMT

There is no event. You need to enumerate items and get Checked status

--
Alex Feinman
---
Visit http://www.opennetcf.org

compactframework >> Listview Checkboxes

by Chris Tacke, eMVP » Thu, 28 Jul 2005 03:28:03 GMT

It could probably be worked out with an IMessageFilter to catch a touch and
then determine if it's in the left 8(?) pixels of the control to determine
if it's the checkbox.

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate

compactframework >> Listview Checkboxes

by Daniel Moth » Thu, 28 Jul 2005 03:33:30 GMT

OK, I'll bite. Why isn't the ItemCheck event enough?

Cheers
Daniel

compactframework >> Listview Checkboxes

by Chris Tacke, eMVP » Thu, 28 Jul 2005 03:52:04 GMT

I'm just going on the fact that Alex said there is no event. I can't recall
if I've had to catch it, so I can't say one way or the other.

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate

compactframework >> Listview Checkboxes

by Alex Feinman [MVP] » Thu, 28 Jul 2005 05:38:43 GMT

It might have been enough if I remembered about it. I forgot, honestly

--
Alex Feinman
---
Visit http://www.opennetcf.org

compactframework >> Listview Checkboxes

by Daniel Moth » Thu, 28 Jul 2005 05:41:38 GMT

...as long as I am not missing something (which by the sounds of it I am
not) it is all good

Cheers
Daniel

Similar Threads

1. ListView checkbox error

I am trying to set the OnCheckedChanged event on a control in a ListView 
template and I am getting the error "The server tag is not well formed" but 
I cannot figure out why.  The error is occurring on the line with the 
checkbox control. Below is the ItemTemplate.  Can anyone help?  I am trying 
to run a subroutine and send it a value from the TransID data item.  Thanks.

David

        <ItemTemplate>
            <tr style="background-color:#DCDCDC;color: #000000;">
                <td><asp:LinkButton ID="LBtnEdit" runat="server" 
CommandName="Edit" Text="Edit"></asp:LinkButton></td>
                <td><asp:CheckBox ID="ckPayTrans" runat="server" 
Checked='<%# Eval("PayTrans") %>' AutoPostBack="True" 
OnCheckedChanged="Check_Clicked(<%# Eval("TransID") %>)" /></td>
                <td><asp:Label ID="LblTransDate" runat="server" Text='<%# 
Eval("TransDate", "{0:d}") %>' /></td>
                <td><asp:Label ID="LblClient" runat="server" Text='<%# 
Eval("ClientLastFirst") %>' /></td>
                <td><asp:Label ID="LblExpense" runat="server" Text='<%# 
Eval("Expense") %>' />
                    <asp:Label ID="LblIncomeType" runat="server" Text='<%# 
Eval("IncomeType") %>' CssClass="Hide" />
                </td>
                <td><asp:Label ID="LblVendorName" runat="server" Text='<%# 
Eval("VendorName") %>' /></td>
                <td align="right"><asp:Label ID="LblTransAmount" 
runat="server" Text='<%# Eval("TransAmount", "{0:n2}") %>' /></td>
                <td><asp:Label ID="LblAccountNo" runat="server" Text='<%# 
Eval("AccountNo") %>' /></td>
                <td><asp:Label ID="LblReferenceNo" runat="server" Text='<%# 
Eval("ReferenceNo") %>' /></td>
                <td><asp:LinkButton ID="LBtnDelete" runat="server" 
CommandName="Delete" Text="Delete" CssClass="Hide"
                        OnClientClick="return confirmDel('Inc/Exp 
Transaction');"></asp:LinkButton></td>
           </tr>
        </ItemTemplate>


2. ListView checkbox

3. Listviews, checkboxes and ItemActivate.OneClick

Like so many others I've been trying to make a listview with checkboxes 
that doesn't toggle the check state of an item when the item is 
selected. And then I found it: all you need to to is set the Activate 
property to ItemActivate.OneClick. Which isn't necessarily *entirely* 
obvious from the documentation:

"The user must single-click to activate items. The cursor changes to a 
hand pointer cursor, and the item text changes color as the user moves 
the mouse pointer over the item."

Can anyone give me any kind of logical explanation, no matter how 
twisted (non-twisted works too!), why OneClick causes the checkbox to 
behave the way I want?

Thanks
Johan

4. VGA and TreeView and ListView checkboxes are tiny

5. ListView: Checkboxes and an ImageList problem

Hi Peter

Thank you for your help...

6. ListView + CheckBoxes: do not check if select?

7. ListView.CheckBoxes

Hi All,

Instead of writing a custom control from the ground up, I would like to
extend the ListView control to allow certain ListView items to contain
a checkbox while others should not. Is this possible (ie. something
that can be overridden)?

Thanks,

Rein

8. ListView Checkbox position