P
Phil Jones
I'm wondering if I can formulate the display 'content' of a data-grid item
from within a procedure in a code-behind class?
I can see that this can be done declaratively with something like this:
<ASPATAGRID ID="grdMembers" RUNAT="server">
<COLUMNS>
<ASP:TEMPLATECOLUMN>
<HeaderTemplate>Email</HeaderTemplate>
<ItemTemplate>
<ASP:LABEL RUNAT="server"
TEXT='<%# DataBinder.Eval(Container.DataItem,
"Email.Address.Value") %>' />
</ItemTemplate>
</ASP:TEMPLATECOLUMN>
</COLUMNS>
</ASPATAGRID>
But I'd like to have more control over the creation of the content than what
can be expressed witin the "DataBinder.Eval" statement. And I'd also like
to programmatically construct the columns within the DataGrid rather than
declare them.
Is this possible? Can anyone point me in the right direction here, perhaps
to some sample code somewhere.
Many thanks.....
from within a procedure in a code-behind class?
I can see that this can be done declaratively with something like this:
<ASPATAGRID ID="grdMembers" RUNAT="server">
<COLUMNS>
<ASP:TEMPLATECOLUMN>
<HeaderTemplate>Email</HeaderTemplate>
<ItemTemplate>
<ASP:LABEL RUNAT="server"
TEXT='<%# DataBinder.Eval(Container.DataItem,
"Email.Address.Value") %>' />
</ItemTemplate>
</ASP:TEMPLATECOLUMN>
</COLUMNS>
</ASPATAGRID>
But I'd like to have more control over the creation of the content than what
can be expressed witin the "DataBinder.Eval" statement. And I'd also like
to programmatically construct the columns within the DataGrid rather than
declare them.
Is this possible? Can anyone point me in the right direction here, perhaps
to some sample code somewhere.
Many thanks.....