D
Doogie
Hi, I have been trying to get a checkbox added to a repeater control
of mine and then try to access events of the repeater control when a
user clicks the checkbox. At first, since the control is tied to xsl,
I added the checkbox there. That works fine, but I cannot get any
information about the checkbox (i.e. checked, unchecked, etc) 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.
In addition, I can't go the route of checking this information within
the vb code because none of the Repeater's events will execute when I
click on the grid in the app. I've tried itemCommand as suggested by
someone but it doesn't execute when I click the grid.
I'm half-tempted to use a different control, but this control is tied
to a lot of xsl, javascript, vb code already in the app so that would
be a lot of work to do.
Can anyone see what I'm doing wrong?
of mine and then try to access events of the repeater control when a
user clicks the checkbox. At first, since the control is tied to xsl,
I added the checkbox there. That works fine, but I cannot get any
information about the checkbox (i.e. checked, unchecked, etc) 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.
In addition, I can't go the route of checking this information within
the vb code because none of the Repeater's events will execute when I
click on the grid in the app. I've tried itemCommand as suggested by
someone but it doesn't execute when I click the grid.
I'm half-tempted to use a different control, but this control is tied
to a lot of xsl, javascript, vb code already in the app so that would
be a lot of work to do.
Can anyone see what I'm doing wrong?