Results 1 to 6 of 6

Thread: [2005] Checkbox/radiobuttonlist next to childs in master/child data

Hybrid View

  1. #1
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] Checkbox/radiobuttonlist next to childs in master/child data

    So shouldn't you just place the master radiobuttons like here:

    Code:
        <asp:Repeater ID="question" runat="server" OnItemDataBound="question_ItemDataBound">
            <ItemTemplate>
                <tr>
                    <td >
                        <%# DataBinder.Eval(Container.DataItem, "Description") %></br>
                        <asp:Radiobutton............................ />
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <table border="0">
                            <asp:Repeater ID="answer" runat="server">
                                <ItemTemplate>
                                    <tr>                             
                                        <td>                 
                                            <%# DataBinder.Eval(Container.DataItem, "Description") %>
                                            </br>
                                        </td>
                                        <td>
                                            <asp:RadioButton ID="RadioButton1" runat="server" />
                                        </td>        
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </table>
                        <br />
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Location
    Belgium
    Posts
    68

    Re: [2005] Checkbox/radiobuttonlist next to childs in master/child data

    That would show 1 radiobutton for each question. I need one for each answer in each question, grouped by question.

    I found out I could manually assign them a group, for instance the questionID. However, that created a problem since ASP renames all the controls when generating the html so they 'wouldn't' end up in the same group after all.

    A workaround would be to use a custom radiobutton control that overrides some functionality regarding the name change.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width