Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Repeater / checkbox

Reply
Thread Tools

Repeater / checkbox

 
 
Doogie
Guest
Posts: n/a
 
      06-15-2007
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?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASPNET CheckBox and a CheckBox in a TemplateField Jason Huang ASP .Net 0 06-29-2007 12:35 AM
DataGrid and embeded Checkbox..How to find if checkbox clicked =?Utf-8?B?RG90TmV0RGV2?= ASP .Net 1 10-06-2006 04:11 PM
disable checkbox list checkbox Vikram ASP .Net 1 01-25-2006 02:59 PM
Howto bind CheckBox to the datagrid/ Then update the database field when the checkbox is clicked. Joey Pang ASP .Net Datagrid Control 4 06-13-2005 02:29 AM
Text on Checkbox below the checkbox tshad ASP .Net 0 04-14-2005 11:26 PM



Advertisments