Resource field - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

Resource field

  • Resource field
  • Hi,

    Just a quick question about resource properties:
    Following this code:

    var addressSection = new ContentViewSectionElement(detailView.Sections)
                    Name = "AddressSection",
                    Title = "AddressSection",
                    ResourceClassId = typeof(CompaniesResources).Name,
                    CssClass = "sfExpandableForm",
                    ExpandableDefinitionConfig = Expanded = true

    Which property do I have to use in my resource class as the key of the resource? I expect it to be the 'Name' property, but that doesn't work.

  • Hi Daniel ,

    Yes, you should use the name


    TypeResourcesis the type, but the key might me

    The custom resource class should have the following attribute

    [ObjectInfo("TypeResources", ResourceClassId = "TypeResources", TitlePlural = "TypeResourcesTitlePlural")]
        public sealed class TypeResources: Resource\

    where you have resource entries

                           Value = "Fields",
                           Description = "The title of the toolbox for designing items.",
                           LastModified = "2011/05/20")]
            public string ControlsTitle
                    return this["ControlsTitle"];

                           Value = "A collection of reusable fields.",
                           Description = "The description of the toolbox for designing items.",
                           LastModified = "2011/05/20")]
            public string ControlsDescription
                    return this["ControlsDescription"];

            /// <value>Title plural for the items module.</value>
                Value = "Forms",
                Description = "Title plural for the module.",
                LastModified = "2011/05/01")]
            public string TypeResourcesTitlePlural
                get return this["TypeResourcesTitlePlural"];

    Ivan Dimitrov
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>