Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a datalist with a checkbox in each of the rows like so.

 

<ItemTemplate>

<TABLE>

<TR bgColor="#330099" style="BACKGROUND-IMAGE: url(..\..\..\WebFiles\images\barForNotes.gif)" id="RowHeaderBar" runat="server">

<TD style="FONT-WEIGHT: bold; COLOR: white">

<%# DataBinder.Eval(Container.DataItem, NotesData.BYWHO_FIELD) %>

did a

<%# DataBinder.Eval(Container.DataItem, NotesData.FK_ACTION_PERFORMED_FIELD) %>

on

<%# DataBinder.Eval(Container.DataItem, NotesData.JOB_DATE_FIELD) %>

. This entry was added on

<%# DataBinder.Eval(Container.DataItem, NotesData.DATE_FIELD) %>

</TD>

</TR>

<TR>

<TD><%# DataBinder.Eval(Container.DataItem, NotesData.NOTE_DESCRIPTION_FIELD) %></TD>

</TR>

<tr>

<td align="right">

Read

<asp:CheckBox ID="Notes_CBX" Runat="server" AutoPostBack="True" Checked=""></asp:CheckBox>

</td>

</tr>

</TABLE>

</ItemTemplate>

 

I just dont know how to reference which one was checked. Anyone can help!!

Posted

<asp:CheckBox id=chkpresent runat="server" Width="10px" Checked='<%# DataBinder.Eval(Container, "DataItem.SchedulerAtwork") %>'></asp:CheckBox>

 

 

 

 

Private Sub saveall(ByVal dt As DataList, ByRef tbl As DataTable)

 

 

 

For irowcount As Integer = 0 To dt.Items.Count - 1

 

 

tbl.Rows.Find(CType(dt.Items(irowcount).FindControl("lblpk"), Label).Text).Item("scheduleratwork") = CType(dt.Items(irowcount).FindControl("chkpresent"), CheckBox).Checked

 

 

 

Next

Me.adapscheduler.Update(tbl)

 

 

 

End Sub

 

 

Hope this what you wanted to do.

Programmers are trying to create bigger and beter idiot proof programs.The universe is trying to create bigger and beter idiots and so far the universe is winning.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...