?
Solved

C# 2010 ListView control with checkboxes reaction to space bar

Posted on 2014-07-28
8
Medium Priority
?
492 Views
Last Modified: 2014-07-31
I have a form with a C# ListBox control containing a list of strings, strings may contain space characters.

When I create the ListBox without "CheckBoxes" everything works fine, a user can type parts of the string and the selection bar within the listbox will move to the item corresponding to the string he's typing. Typing strings with spaces will move to the corresponding item as well.

As soon as I set the CheckBoxes property to True to add a checkbox column, the behaviour changes and the space bar will toggle the checkbox now.

I need the checkbox, any simple way to return the listbox to the same scroll behaviour as it was without the checkbox
0
Comment
Question by:Michael Pfister
  • 5
  • 3
8 Comments
 
LVL 21

Expert Comment

by:Randy Poole
ID: 40223872
Is this a windows or .net application?
0
 
LVL 29

Author Comment

by:Michael Pfister
ID: 40223880
A WindowsForms application/ .NET 4
0
 
LVL 21

Expert Comment

by:Randy Poole
ID: 40223892
Hmm, I see a listbox control but with no 'checkboxes' option, I also see checkedlistbox control. Are you using one of these  MS common controls or a third party control?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 29

Author Comment

by:Michael Pfister
ID: 40223920
Not ListBox, but ListView, sorry, my mistake
No 3rd party involved
0
 
LVL 21

Expert Comment

by:Randy Poole
ID: 40224029
I researched it, and do not see a way to do it. Sorry..
0
 
LVL 29

Author Comment

by:Michael Pfister
ID: 40224118
Do you know a 3rd party control that could do it?
0
 
LVL 21

Expert Comment

by:Randy Poole
ID: 40224323
Sorry I do not.
0
 
LVL 21

Accepted Solution

by:
Randy Poole earned 2000 total points
ID: 40224607
What you could do is if you use the listview in details view then you could set checkboxes to false and add a subitem which is a icon and control your state that way..
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question