protected virtual void AddTemplateToControl(Control destination, ITemplate template, GridViewBaseTemplateContainer templateContainer, TemplateContainerCollection collection) { var templateContainerID = templateContainer._GetID(); template.InstantiateIn(templateContainer); templateContainer.AddToHierarchy(destination, templateContainerID); if (string.IsNullOrEmpty(destination.ID) && !string.IsNullOrEmpty(templateContainerID)) destination.ID = "tc" + templateContainerID; if (collection == null) return; collection.Add(templateContainer); }
protected virtual void AddTemplateToControl(Control destination, ITemplate template, GridViewBaseTemplateContainer templateContainer, TemplateContainerCollection collection) { var templateContainerID = templateContainer._GetID(); template.InstantiateIn(templateContainer); templateContainer.AddToHierarchy(destination, templateContainerID); if (string.IsNullOrEmpty(destination.ID) && !string.IsNullOrEmpty(templateContainerID)) { destination.ID = "tc" + templateContainerID; } if (collection == null) { return; } collection.Add(templateContainer); }
public static string _GetID(this GridViewBaseTemplateContainer source) { return(GridViewBaseTemplateContainerMembersRepository.GetID.Invoke(source)); }