views:

18

answers:

0

I've added an ITemplate to Telerik's RadGrid control called SearchMenuTemplate ala:

    public class AbsRadGrid : RadGrid
{

    private ITemplate _ItemTemplate;
    [PersistenceMode(PersistenceMode.InnerProperty)]
    [TemplateContainer(typeof(searchBar))]
    public ITemplate SearchMenuTemplate
    {
        get { return _ItemTemplate; }// get
        set { _ItemTemplate = value; }// set
    }
}

And the Template class looks something like (mandatory override methods like createchildcontrol have been omitted for brevity):

[ParseChildren(true)]
class searchBar : CompositeControl, INamingContainer
{
    public string rbStartsWithText { get; set; }
}

Now, in the source control window the RadGrid control sees the Template. But rbStartsWithText isn't an attribute on the node.

I want to see something like this (note: abs prefix is registered in the markup):

    <abs:AbsRadGrid ID="rg" runat="server">
    <SearchMenuTemplate rbStartsWithText="Starts With" />
</abs:AbsRadGrid>

Instead rbStartsWithText is throwing a green squiggly and telling me it's not a valid attribute of SearchMenuTemplate.