Click here to Skip to main content
12,820,712 members (30,060 online)
   

C#

 
GeneralRe: StreamWriter.WriteAsync Pin
wizardzz14-Feb-13 9:55
memberwizardzz14-Feb-13 9:55 
Questionsingle selection of radio buttons in a table Pin
Member 258173814-Feb-13 5:36
memberMember 258173814-Feb-13 5:36 
AnswerRe: single selection of radio buttons in a table Pin
Richard MacCutchan14-Feb-13 5:58
mvpRichard MacCutchan14-Feb-13 5:58 
AnswerRe: single selection of radio buttons in a table Pin
Alan Balkany14-Feb-13 6:04
memberAlan Balkany14-Feb-13 6:04 
The radiobutton list in each row seems like a good approach because it handles one of your constraints: at most one choice in each row.

To handle the other constraint (exactly one choice in each column) you need to make a handler that's called whenever the selection state of a radio button changes, then check this constraint in the handler. If it's violated (i.e. more than one choice in a column) you can give the user an error message or change their previous selection in that column.

When they're done (e.g. they press the OK button), then you can check to see if every column has a selection.
QuestionBetter code Pin
source.compiler14-Feb-13 4:57
membersource.compiler14-Feb-13 4:57 
AnswerRe: Better code Pin
Alan Balkany14-Feb-13 5:50
memberAlan Balkany14-Feb-13 5:50 
GeneralRe: Better code Pin
Manfred R. Bihy14-Feb-13 6:28
memberManfred R. Bihy14-Feb-13 6:28 
QuestionRe: Better code Pin
source.compiler14-Feb-13 6:40
membersource.compiler14-Feb-13 6:40 
AnswerRe: Better code Pin
Alan Balkany14-Feb-13 6:50
memberAlan Balkany14-Feb-13 6:50 
GeneralRe: Better code Pin
Dave Kreskowiak14-Feb-13 7:09
mvpDave Kreskowiak14-Feb-13 7:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 26 Mar 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid