Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
170
TemplateColumng error
posted

Hello,

I am following the video sample "WebDataGrid Master Detail'  to add a template column but I cant get it to work..

I get the following error when implementing a template column: BC30691: 'TemplateContainer' is a type in 'UI' and cannot be used as an expression. 

I am using VS 2008 with infragistics 2010, in VB.net and a SQL datasource

Any ideas what could be wrong?

Thanks

Dan

 <%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "CustomerName") %>

 

 

Parents
  • 19693
    posted

    Hello in VB.Net the syntax is :

    Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

                <ig:TemplateDataField Key="UnitPrice">

                        <ItemTemplate>

                            <asp:LinkButton ID="LinkButton1" runat="server"

    Text='<%# DataBinder.Eval(DirectCast(Container, Infragistics.Web.UI.TemplateContainer).DataItem, "UnitPrice") %>'

                               CommandArgument='<%# DataBinder.Eval(DirectCast(Container, Infragistics.Web.UI.TemplateContainer).Item, "Row.Index") %>'>

      </asp:LinkButton>

                        </ItemTemplate>

                        <Header Text="UnitPrice" />

                    </ig:TemplateDataField>

Reply Children
No Data