Click to See Complete Forum and Search --> : UserControl in the EditTemplate of a DataGrid


m92httn
May 22nd, 2004, 06:03 PM
Hello,
I want to use a UserControl in the EditTemplate.
This works fine, except that I now also want to assign a bound attribute value (NewsID) to a public property of the UserControl (LinkListID). It seems to work to do this in the <itemTemplate> section of the DataGrid but not in the <EditItemTemplate> section

MY QUESTION:
How can I assign a bound value of the 'Edited' row in a DataGrid to a public property of the UserControl???

The code below shows how I tried, but this does not work, no value is assigned to the public property 'LinkListID' of the UserControl.
...

<EditItemTemplate>
...
<portal:EditLinkList ID="EditLinkList1" LinkListID='<%# ((DataRowView)Container.DataItem)["NewsID"] %>' runat="server" />
...
</EditItemTemplate>

I would very much appreciate if someone can bring some light over this problem!

Thanks in advance!