DataGridItems can't see HTML controls within

M

Michael Nemtsev

I have grid with template and bound columns likes below
===================
<asp:TemplateColumn HeaderText="Rule ID">
<ItemTemplate>
<asp:Label id="Label3" Runat="server" Text='<%#DataBinder.Eval(Container.DataItem,
"Rule ID")%>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>

<asp:BoundColumn DataField="Rule Name" HeaderText="Rule Name"></asp:BoundColumn>
====================

When I trying to get access to the DataGridItems I've found that using DataGridItem.row.Controls[0].HasControls()
return *true* (template column) and DataGridItem.row.Controls[1].HasControls()
returns *false* (BoundColumn)

Could somebody explain this behavior?

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top