Eval ("datacolumn") could not pass value to UserControl in ReorderList ItemTemplate after DataBind

Last post 12-26-2009 11:39 PM by deepu.mi. 1 replies.

Sort Posts:

  • Eval ("datacolumn") could not pass value to UserControl in ReorderList ItemTemplate after DataBind

    10 hours, 11 minutes ago
    • Member
      point Member
    • athankon
    • Member since 11-03-2009, 7:56 PM
    • Posts 1

    Hello people (first time posting here),

    I am using a Usercontrol inside an ItemTemplate of a ReorderList control (bound to a DataTable). I can pass a value correclty when the page loads by using the Eval("DataColumn") mechanism.

    Everything works fine but when i reorder the List and databind to new modified datatable, the Eval("DataColumn") does not work correclty and no value is passed. After DataBind of external ReorderList is called the user control Load event is invocked correclty but it seems that Eval ("DataColumn") does not evaluate correclty.

    Any help would be greatly appreciated!

  • Re: Eval ("datacolumn") could not pass value to UserControl in ReorderList ItemTemplate after DataBind

    48 minutes ago
    • Member
      16 point Member
    • deepu.mi
    • Member since 11-12-2009, 12:05 AM
    • Posts 9

    Why don't you try DataBinder Eval

    ex : <ItemTemplate>
                   <asp:Label ID="ItemName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Title") %>' />
            </ItemTemplate>

    Thanks
    Deepu


Page 1 of 1 (2 items)