Solved

Multi select control for ASP.NET

Posted on 2008-06-10
6
1,217 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
  • 3
  • 3
6 Comments
 
LVL 15

Expert Comment

by:Solar_Flare
Comment Utility
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
Comment Utility
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
Comment Utility
here is an article on using the checklistbox

http://www.developerfusion.co.uk/show/14/1/
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

Author Comment

by:zachvaldez
Comment Utility
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
Comment Utility
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
Comment Utility
I work with VB.NET. thanks anyways
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
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 …
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now