Expand|Select|Wrap|Line Numbers
- <asp:TemplateField HeaderText="Name:">
- <ItemTemplate>
- <%#Eval("firstname")%>, <%#Eval("lastname")%>
- </ItemTemplate>
- </asp:TemplateField>
Expand|Select|Wrap|Line Numbers
- Protected Overrides Sub OnDataBound(ByVal e As System.EventArgs)
- Dim row As DetailsViewRow
- For Each row In Me.Rows
- If String.IsNullOrEmpty(row.Cells(1).Text) Or row.Cells(1).Text = " " Then
- row.Visible = False
- End If
- Next
- End Sub
I do not want to add a control inside the itemtemplate, I tried that and it worked, but is there anyway to access the data inside the templatefield for how it is shown? I posted this on Asp.net forums if you would like to take a look there too.
http://forums.asp.net/t/1203270.aspx
Apparently, it must bind the Eval() statments at a later time...
Thanks!