Repeater / checkbox

Discussion in 'ASP .Net Web Controls' started by Doogie, Jun 15, 2007.

  1. Doogie

    Doogie Guest

    Hi, I have been trying to get a checkbox added to a repeater control
    of mine and have limited success. At first, since the control is tied
    to xsl, I added the checkbox there. That works fine, but I am having
    problems getting access to status information (i.e. checked,
    unchecked, etc) of the checkbox when I pass data from the xsl over to
    a method in java. I can get info on the other columns but not that
    one.

    So I thought maybe it was because the repeater control's html doesn't
    have the checkbox identified in it. Below is how the repeater control
    looks:

    <asp:repeater ID="RptTrip" Runat="server" EnableViewState="false">
    <ItemTemplate>
    <trip_detail_info trip_detail_id ='<%#
    Container.DataItem("trip_detail_id")%>'
    leg_start_dt = '<%#
    Container.DataItem("leg_start_dt")%>'
    pickup_iso_dt = '<%# Container.DataItem("pickup_iso_dt")%>'
    trip_status = '<%# Container.DataItem("trip_status")%>'
    eqp_type = '<%# filterPostrophe(Container.DataItem("eqp_type"))%>'
    expire_iso_dt = '<%# Container.DataItem("expire_iso_dt")%>'
    dispatch_dt = '<%# Container.DataItem("dispatch_dt")%>'
    dispatch_iso_dt = '<%# Container.DataItem("dispatch_iso_dt")%>'
    trip_status_update_dt = '<%#
    Container.DataItem("trip_status_update_dt")%>'
    status_iso_dt = '<%# Container.DataItem("status_iso_dt")%>'
    haz = '<%# Container.DataItem("haz")%>'
    leg_type_ds = '<%# Container.DataItem("leg_type_ds")%>'
    move_type_ds = '<%# Container.DataItem("move_type_ds")%>'
    cont_reefer = '<%# Container.DataItem("cont_reefer")%>'
    trip_bkg_nr = '<%# Container.DataItem("trip_bkg_nr")%>'
    container_an = '<%# Container.DataItem("container_an")%>'
    orig_customer_nm = '<%#
    filterPostrophe(Container.DataItem("orig_customer_nm"))%>'
    dest_customer_nm = '<%#
    filterPostrophe(Container.DataItem("dest_customer_nm"))%>'
    orig_loc_nm = '<%#
    filterPostrophe(Container.DataItem("orig_loc_nm"))%>'
    dest_loc_nm = '<%#
    filterPostrophe(Container.DataItem("dest_loc_nm"))%>'/>
    </ItemTemplate>
    </asp:repeater>

    So I tried to add a checkbox like so:

    <asp:repeater ID="RptTrip" Runat="server" EnableViewState="false">
    <ItemTemplate>
    <td><asp:CheckBox ID="cb" Runat="server" Checked="true"
    Enabled="true"></asp:CheckBox> </td>
    <trip_detail_info trip_detail_id ='<%#
    Container.DataItem("trip_detail_id")%>'
    leg_start_dt = '<%#
    Container.DataItem("leg_start_dt")%>'
    pickup_iso_dt = '<%# Container.DataItem("pickup_iso_dt")%>'
    trip_status = '<%# Container.DataItem("trip_status")%>'
    eqp_type = '<%# filterPostrophe(Container.DataItem("eqp_type"))%>'
    expire_iso_dt = '<%# Container.DataItem("expire_iso_dt")%>'
    dispatch_dt = '<%# Container.DataItem("dispatch_dt")%>'
    dispatch_iso_dt = '<%# Container.DataItem("dispatch_iso_dt")%>'
    trip_status_update_dt = '<%#
    Container.DataItem("trip_status_update_dt")%>'
    status_iso_dt = '<%# Container.DataItem("status_iso_dt")%>'
    haz = '<%# Container.DataItem("haz")%>'
    leg_type_ds = '<%# Container.DataItem("leg_type_ds")%>'
    move_type_ds = '<%# Container.DataItem("move_type_ds")%>'
    cont_reefer = '<%# Container.DataItem("cont_reefer")%>'
    trip_bkg_nr = '<%# Container.DataItem("trip_bkg_nr")%>'
    container_an = '<%# Container.DataItem("container_an")%>'
    orig_customer_nm = '<%#
    filterPostrophe(Container.DataItem("orig_customer_nm"))%>'
    dest_customer_nm = '<%#
    filterPostrophe(Container.DataItem("dest_customer_nm"))%>'
    orig_loc_nm = '<%#
    filterPostrophe(Container.DataItem("orig_loc_nm"))%>'
    dest_loc_nm = '<%#
    filterPostrophe(Container.DataItem("dest_loc_nm"))%>'/>
    </ItemTemplate>
    </asp:repeater>

    For some reason, it is not recognizing that checkbox and displaying it
    on the screen. I've tried it with and without the <td> lines.

    Can anyone see what I'm doing wrong?
    Doogie, Jun 15, 2007
    #1
    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. tshad
    Replies:
    0
    Views:
    512
    tshad
    Apr 15, 2005
  2. Vikram

    disable checkbox list checkbox

    Vikram, Jan 25, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,385
    ThunderMusic
    Jan 25, 2006
  3. =?Utf-8?B?RG90TmV0RGV2?=

    DataGrid and embeded Checkbox..How to find if checkbox clicked

    =?Utf-8?B?RG90TmV0RGV2?=, Oct 6, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    809
    David Wier
    Oct 6, 2006
  4. Jason Huang
    Replies:
    0
    Views:
    543
    Jason Huang
    Jun 29, 2007
  5. Joey Pang
    Replies:
    4
    Views:
    509
    Joey Pang
    Jun 13, 2005
Loading...

Share This Page