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
395
Error while programmtically adding tab to WebTab control
posted

The error I get is the following:Provided field of type 'Infragistics.Web.UI.GridControls.GridField' cannot be added to the columns collection. Only BoundDataField or TemplateDataField fields are supported.

<div id="WebTab">
            <asp:UpdatePanel ID="WebTabUpdatePanel" runat="server">
                <ContentTemplate>   
                    <ig:WebTab ID="WebTab1" runat="server" Height="200px" Width="300px">
                        <AjaxIndicator Enabled="True" Location="MiddleCenter" />
                        <Tabs>
                            <ig:ContentTabItem runat="server" Text="Tab 1">
                            </ig:ContentTabItem>
                        </Tabs>
                        <ContentPane>
                            <RoundedBackground Enabled="true" />
                        </ContentPane>
                    </ig:WebTab>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
        <div id="push"></div>
    </div>

 protected void AddNewTab(Infragistics.Web.UI.NavigationControls.DataMenuItemEventArgs e)
        {
            string usrCntrl = e.Item.Value.ToString();
            if (!string.IsNullOrEmpty(usrCntrl))
            {
                //add a new tab to the main WebTab control and load the target user control
                ContentTabItem ctab = new ContentTabItem();
                ctab.UserControlUrl = usrCntrl;
                ctab.Text = e.Item.Text;
                WebTab1.Tabs.Add(ctab);
                WebTab1.SelectedIndex = WebTab1.Tabs.IndexOf(ctab);
            }
        }

 

Parents
No Data
Reply Children
No Data