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
75
How to add template control bindings programmatically?
posted

Hi,

I have been try to programmatically add templates to a WebDataGrid. This is described here:

http://help.infragistics.com/NetAdvantage/ASPNET/2011.1/CLR4.0/?page=WebDataGrid_Using_the_Template_Collection.html

 

I was successful with this. However, my next step was to set up some template control bindings...programmatically. The help documentation describes how to add template control bindings the Data Bindings Editor, here:

http://help.infragistics.com/NetAdvantage/ASPNET/2011.1/CLR4.0/?page=WebDataGrid_Template_Control_Bindings.html

The resulting ASP.NET markup looks something something like this:

      ...

      </Columns>
        <Templates>
            ...
            <ig:ItemTemplate ID="WebDataGrid1Template2" runat="server"
                TemplateID="Template2">
                <Template>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("name", "{0}") %>'></asp:TextBox>
                    <asp:HyperLink ID="HyperLink1" runat="server"
                        NavigateUrl='<%# Eval("priority") %>'>HyperLink</asp:HyperLink>
                </Template>
            </ig:ItemTemplate>
        </Templates>
    </ig:WebDataGrid>

 

I can understand how to do this win markup However, I cannot see how I would add these template control bindings programmatically. Is there any help documentation on this? Are there any samples that demonstrate how to do this?