Click here to Skip to main content
15,897,518 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# parser Pin
Daniel Pfeffer19-Jan-17 4:47
professionalDaniel Pfeffer19-Jan-17 4:47 
GeneralRe: C# parser Pin
OriginalGriff19-Jan-17 4:52
mveOriginalGriff19-Jan-17 4:52 
GeneralRe: C# parser Pin
Daniel Pfeffer19-Jan-17 5:07
professionalDaniel Pfeffer19-Jan-17 5:07 
GeneralRe: C# parser Pin
OriginalGriff19-Jan-17 4:49
mveOriginalGriff19-Jan-17 4:49 
QuestionSSD Computer and Visual Studio 2015... Pin
wtf3218-Jan-17 19:11
wtf3218-Jan-17 19:11 
AnswerRe: SSD Computer and Visual Studio 2015... Pin
Pete O'Hanlon18-Jan-17 19:19
mvePete O'Hanlon18-Jan-17 19:19 
AnswerRe: SSD Computer and Visual Studio 2015... Pin
OriginalGriff18-Jan-17 20:28
mveOriginalGriff18-Jan-17 20:28 
AnswerRe: SSD Computer and Visual Studio 2015... Pin
Nathan Minier19-Jan-17 1:22
professionalNathan Minier19-Jan-17 1:22 
AnswerRe: SSD Computer and Visual Studio 2015... Pin
Eddy Vluggen19-Jan-17 1:51
professionalEddy Vluggen19-Jan-17 1:51 
GeneralRe: SSD Computer and Visual Studio 2015... Pin
wtf3219-Jan-17 2:26
wtf3219-Jan-17 2:26 
AnswerRe: SSD Computer and Visual Studio 2015... Pin
Gerry Schmitz19-Jan-17 5:27
mveGerry Schmitz19-Jan-17 5:27 
QuestionWinforms custom property fails to reload - continued from QA Pin
Midi_Mick18-Jan-17 3:53
professionalMidi_Mick18-Jan-17 3:53 
AnswerRe: Winforms custom property fails to reload - continued from QA Pin
Gerry Schmitz18-Jan-17 4:47
mveGerry Schmitz18-Jan-17 4:47 
GeneralRe: Winforms custom property fails to reload - continued from QA Pin
Midi_Mick18-Jan-17 4:54
professionalMidi_Mick18-Jan-17 4:54 
GeneralRe: Winforms custom property fails to reload - continued from QA Pin
Gerry Schmitz18-Jan-17 5:19
mveGerry Schmitz18-Jan-17 5:19 
GeneralRe: Winforms custom property fails to reload - continued from QA Pin
Midi_Mick18-Jan-17 5:34
professionalMidi_Mick18-Jan-17 5:34 
QuestionRe: Winforms custom property fails to reload - continued from QA. A new clue. Pin
Midi_Mick18-Jan-17 4:48
professionalMidi_Mick18-Jan-17 4:48 
QuestionWhen is it safe to use Monitor (lock) with Task? Pin
Bernhard Hiller18-Jan-17 2:34
Bernhard Hiller18-Jan-17 2:34 
AnswerRe: When is it safe to use Monitor (lock) with Task? Pin
Pete O'Hanlon18-Jan-17 3:25
mvePete O'Hanlon18-Jan-17 3:25 
GeneralRe: When is it safe to use Monitor (lock) with Task? Pin
Bernhard Hiller18-Jan-17 21:05
Bernhard Hiller18-Jan-17 21:05 
AnswerRe: When is it safe to use Monitor (lock) with Task? Pin
Richard Deeming18-Jan-17 8:11
mveRichard Deeming18-Jan-17 8:11 
GeneralRe: When is it safe to use Monitor (lock) with Task? Pin
Bernhard Hiller18-Jan-17 21:11
Bernhard Hiller18-Jan-17 21:11 
GeneralRe: When is it safe to use Monitor (lock) with Task? Pin
Pete O'Hanlon18-Jan-17 21:15
mvePete O'Hanlon18-Jan-17 21:15 
QuestionGroup of Checkboxes Pin
eejaynic17-Jan-17 11:41
eejaynic17-Jan-17 11:41 
I have a group of checkboxes that need their values checked on submissions. I can't find a convenient way to group them in MVC. Here's what i have in the markup:
HTML
<th>Role:</th>
        </tr>
        <tr>


            <th>Booker:</th>
            <td>@Html.CheckBoxFor(m => m.Booker)</td>
            <th>OA:</th>
            <td>@Html.CheckBoxFor(m => m.OA)</td>
            <th>Hauler:</th>
            <td>@Html.CheckBoxFor(m => m.Hauler)</td>
            <th>DA:</th>
            <td>@Html.CheckBoxFor(m => m.DA)</td>
        </tr>
        <tr>
            <th>Booker Only:</th>
            <td>@Html.CheckBoxFor(m => m.BAO)</td>
            <th>OA Only:</th>
            <td>@Html.CheckBoxFor(m => m.OAO)</td>
            <th>DA Only:</th>
            <td>@Html.CheckBoxFor(m => m.DAO)</td>


Later on, I'm attempting to send a message to the screen letting the user know AT LEAST one of the boxes must be checked:
JavaScript
<script type="text/javascript" language="javascript">
    function showDialog() {

        var ddlValue = $("#ddlPostingMonth").val();
        var ChkBooker = $('#Booker').prop("checked");
        var ChkOA = $('#OA').prop("checked");
        var ChkHauler = $('#Hauler').prop("checked");
        var ChkDA = $('#DA').prop("checked");
        var ChkBAO = $('#BAO').prop("checked");
        var ChkOAO = $('#OAO').prop("checked");
        var ChkDAO = $('#DAO').prop("checked");

        //console.log(ChkBooker);
        alert("This is the value: " + ChkBooker);
        if (ddlValue == "")
        { $('#dialog').data("kendoDialog").open(); }

        if (ChkBooker,ChkOA == false)
        { $('#dialog').data("kendoDialog").open(); }

        /*
        else if ((ddlValue == "") || (ChkOA == false))
        { $('#dialog').data("kendoDialog").open(); }
        
        else if ((ddlValue == "") && (ChkHauler == false))
        { $('#dialog').data("kendoDialog").open(); }

        else if ((ddlValue == "") && (ChkDA == false))
        { $('#dialog').data("kendoDialog").open(); }

        else if ((ddlValue == "") && (ChkBAO == false))
        { $('#dialog').data("kendoDialog").open(); }

        else if ((ddlValue == "") && (ChkOAO == false))
        { $('#dialog').data("kendoDialog").open(); }

        else if ((ddlValue == "") && (ChkDAO == false))
        { $('#dialog').data("kendoDialog").open(); }

        */

        else {
            $.post('SaveAgentInfo', $('#AgentDetailsForm').serialize(), function (data) {
                ///TODO: Clean up after save is complete
                console.log(data);
            });

            @*document.location = '@Url.Action("SaveAgentInfo", "Agent", new { master_OrderNum = item.Master_OrderNum })';*@
        }
    }


I've thrown this around in my mind brand for about an hour. I only need ONE box to be checked!! How can I accomplish this and ignore the other boxes if ONE is checked?

Thanks!
-Frustrated Programmer
AnswerRe: Group of Checkboxes Pin
Gerry Schmitz17-Jan-17 13:02
mveGerry Schmitz17-Jan-17 13:02 

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.