Posted on: 11/12/2012 1:05:54 AM | Views : 500

I am looking to programatically load the group template and layout template but I am getting the following error message:
A group placeholder must be specified on ListView 'Listview1' when the GroupTemplate is defined. Specify a group placeholder by setting its ID property to "ListView_GC$groupPlaceHolder1". The group placeholder control must also specify runat="server".


protected void Listview1_Init(object sender, EventArgs e) { System.Diagnostics.Debug.WriteLine("in init"); Listview1.ItemPlaceholderID = "ListView_UC$itemPlaceHolder1"; Listview1.GroupPlaceholderID = "ListView_GC$groupPlaceHolder1"; Listview1.GroupItemCount = 3; Listview1.LayoutTemplate = LoadTemplate("~/Controls/ThumbnailView_LayoutTemplate.ascx"); Listview1.GroupTemplate = LoadTemplate("~/Controls/ThumbnailView_GroupTemplate.ascx"); Listview1.ItemTemplate = LoadTemplate("~/Controls ...

Go to the complete details ...