Solved

Multi select control for ASP.NET

Posted on 2008-06-10
6
1,228 Views
Last Modified: 2012-05-05
Is there an available control for ASP.NET that has features for multi select?
I passing data to an aspx form and I would liek to see a control with checkboxes so I can multiselect on the records or data. thanks
0
Comment
Question by:zachvaldez
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 15

Expert Comment

by:Solar_Flare
ID: 21755000
There are a couple in the default asp.net control set:

The Listview control allows you to select multiple items by shift-clicking and ctrl-clicking them.
The CheckboxList allows you to select multiple items by checking each one
 
0
 

Author Comment

by:zachvaldez
ID: 21756396
Can you show me an example how to do a checklistbox?
I have a select statement- Select ID,Last,First,Address,Cit,State,Zip and it returns 20 items/records.
Id like to put a multiple checkbox so I can mass-process it. thanks
0
 
LVL 15

Expert Comment

by:Solar_Flare
ID: 21764067
here is an article on using the checklistbox

http://www.developerfusion.co.uk/show/14/1/
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

Author Comment

by:zachvaldez
ID: 21765655
Thanks , I check the link and there is not much about checklistbox. I think the Gridview is a better alternative as I tried to explore its features but I m not yet fully understanding of Gridview's ability to provide an array of checlboxes  to match the number of records coming from a dataset or query.
Are you familiar with Gridview and how can it be implemented here?
0
 
LVL 15

Accepted Solution

by:
Solar_Flare earned 300 total points
ID: 21766076
sure you can use a gridview with a checkbox column, that would make it easier to have multiple columns as per your select statement, but you wont be able to get a collection of checked items without looping through all the rows and seeing if the box is checked.

just design your gridview in the designer and then in the code behind check if the boxes are checked.


pseudocode to give the idea of looping through the rows

for each row in gridview.rows
{
      //get the cell value for your checkbox column for this row
      bool isChecked = row.cells[checkboxColumnIndex]

      if (isChecked = true) then do whatever it is that you do with checked rows

}

0
 

Author Comment

by:zachvaldez
ID: 21783746
I work with VB.NET. thanks anyways
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

691 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