E
et
How can I retrieve the Container.DataItem name in a checkbox used in a
template column. During an Update, I can dynamically retrieve the value of
the checkbox, but I need to retrieve the DataItem also.
<asp:TemplateColumn>
<ItemTemplate>
<asp:checkbox id="Checkbox7" runat="server" Checked='<%# fixnull(
DataBinder.Eval(Container.DataItem,"Paid") )%>'>
</asp:checkbox>
</ItemTemplate>
</asp:TemplateColumn>
CodeBehind during Update:
with e.Item
With .Cells(i)
If .HasControls() then
if typeof .Controls(1) is CheckBox then
Dim q as Boolean = cType(.Controls(1), CheckBox).checked
if q = False then
Values = 0
FieldName=?????????????
else
Values = 1
FieldName = ?????????????
End If
template column. During an Update, I can dynamically retrieve the value of
the checkbox, but I need to retrieve the DataItem also.
<asp:TemplateColumn>
<ItemTemplate>
<asp:checkbox id="Checkbox7" runat="server" Checked='<%# fixnull(
DataBinder.Eval(Container.DataItem,"Paid") )%>'>
</asp:checkbox>
</ItemTemplate>
</asp:TemplateColumn>
CodeBehind during Update:
with e.Item
With .Cells(i)
If .HasControls() then
if typeof .Controls(1) is CheckBox then
Dim q as Boolean = cType(.Controls(1), CheckBox).checked
if q = False then
Values = 0
FieldName=?????????????
else
Values = 1
FieldName = ?????????????
End If