RadioButtonList in Repeater Control...Ouch

Discussion in 'ASP .Net' started by Darren, Sep 28, 2004.

  1. Darren

    Darren Guest

    Dear Groups,

    I have searched EVERYWHERE on the net and msdn for a solution to my
    problem and am coming up with nothing.

    I simply need to capture the 'selected row' and the
    rdoRate.SelectedItem.Value.

    Thanks in advance...Darren

    <asp:Repeater id="rptCharts" Runat="server">
    <ItemTemplate>
    <div class="searchcontainer">
    <div class="lnkcol"><a href='../links/?urlid=<%#
    DataBinder.Eval(Container.DataItem, "linkid")%>'><%#
    DataBinder.Eval(Container.DataItem, "linkname")%></a>
    </div>
    <div class="ratecol"><%# DataBinder.Eval(Container.DataItem,
    "votes")%></div>
    <asp:RadioButtonList AutoPostBack="true" ID="rdoRate"
    RepeatDirection="horizontal" Runat="server">
    <asp:ListItem Value="1"></asp:ListItem>
    <asp:ListItem Value="2"></asp:ListItem>
    <asp:ListItem Value="3"></asp:ListItem>
    <asp:ListItem Value="4"></asp:ListItem>
    <asp:ListItem Value="5"></asp:ListItem>
    </asp:RadioButtonList>
    </div>
    </ItemTemplate>
    </asp:Repeater>
     
    Darren, Sep 28, 2004
    #1
    1. Advertising

  2. Darren

    Curt_C [MVP] Guest

    I do something similar like this:

    foreach (RepeaterItem ri in this.rptrList.Items)
    {
    RadioButtonList myList=
    ((RadioButtonList ))ri.FindControl("rdoRate"));
    ...your stuff with this control here.....
    }

    Syntax isn't tested, off the top of my head, but you should get the idea
    from here.....


    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    Site: http://www.Darkfalz.com
    Blog: http://blog.Darkfalz.com


    "Darren" <> wrote in message
    news:...
    > Dear Groups,
    >
    > I have searched EVERYWHERE on the net and msdn for a solution to my
    > problem and am coming up with nothing.
    >
    > I simply need to capture the 'selected row' and the
    > rdoRate.SelectedItem.Value.
    >
    > Thanks in advance...Darren
    >
    > <asp:Repeater id="rptCharts" Runat="server">
    > <ItemTemplate>
    > <div class="searchcontainer">
    > <div class="lnkcol"><a href='../links/?urlid=<%#
    > DataBinder.Eval(Container.DataItem, "linkid")%>'><%#
    > DataBinder.Eval(Container.DataItem, "linkname")%></a>
    > </div>
    > <div class="ratecol"><%# DataBinder.Eval(Container.DataItem,
    > "votes")%></div>
    > <asp:RadioButtonList AutoPostBack="true" ID="rdoRate"
    > RepeatDirection="horizontal" Runat="server">
    > <asp:ListItem Value="1"></asp:ListItem>
    > <asp:ListItem Value="2"></asp:ListItem>
    > <asp:ListItem Value="3"></asp:ListItem>
    > <asp:ListItem Value="4"></asp:ListItem>
    > <asp:ListItem Value="5"></asp:ListItem>
    > </asp:RadioButtonList>
    > </div>
    > </ItemTemplate>
    > </asp:Repeater>
     
    Curt_C [MVP], Sep 28, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Davis

    RadioButtonList in a repeater

    David Davis, Oct 21, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,956
    David Davis
    Oct 21, 2003
  2. Ravi
    Replies:
    2
    Views:
    4,482
    jagdish
    Aug 18, 2006
  3. Rod  Snyder
    Replies:
    1
    Views:
    3,597
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Feb 17, 2005
  4. IFIA
    Replies:
    0
    Views:
    456
  5. John Smith
    Replies:
    1
    Views:
    125
    William Herrera
    Nov 29, 2003
Loading...

Share This Page