Reputation: 249
I feel like i may be phrasing this question incorrectly as it seems like it should be a relatively trivial task, but what i'm looking for is a mechanism to accept multiple user inputs for each item in a list. In practice I intend to list the contents of a directory (list of files) then have them do something like check any permutation of multiple box's for option 1, option 2, option 3,... option n+1. That will then do different things depending on what the user selected.
I.e. Option 1 may move the file to another directory and option 2 may send the file as an email attachment, if both are checked it does both when the user clicks a button.
ListOfFiles Option 1 Option 2
file1.txt X X
file2.csv X
file3.py X
I should then be able to iterate over the list of files and do things to file 1 based on option 1 and 2 being selected, file 2 based on just option 1 being selected... and so on.
Can anyone point me to a c# control or some other mechanism to accomplish this? I'm open to other languages / frameworks as well, just starting with a winform or asp.net application as it seems that there'd be a trivial way to do it in those frameworks...
Upvotes: 0
Views: 58
Reputation: 3682
In Winform you can use DataGridView
add 3 columns
type of first column should be DataGridViewTextBoxColumn
and next 2 column should be DataGridViewCheckBoxColumn
Upvotes: 2