Hello,
Houston I have a problem...
I am a beginner with this and I have created a dynamic webPart. It serves as a list of elements, contains a gridView inside.
On the aspx page I put the web part in the WebPartZone:
<asp:WebPartZone ID=" WebPartZoneIList"
runat="server"
BorderColor="#CCCCCC"
Font-Names="Arial" Padding="6" Width="100%">
<PartChromeStyle
BorderColor="#E2DED6"
Font-Names="Verdana"
ForeColor="Black"
/>
<ZoneTemplate>
<wpc:smallgridwebpart id ="grid1"
runat ="server"
chrometype ="None"
title ="test"
GridPageSize="6">
</wpc:smallgridwebpart>
</ZoneTemplate>
</asp:WebPartZone>
and in Page Init I add the properties:
iWebPartClassLibrary.Class.Content
Content1 = new iWebPartClassLibrary.Class.Content();
grid1.ElementClass =
Content1;
grid1.ObjectNameSpace = "iWebPartClassLibrary.Class.Content";
grid1.UseElementType = true;
grid1.ElementTypeId = 15;
grid1.IListLabelSummaryCSS = "Txt1";
...
All works perfect as intended.
The problem arises if I use a CatalogZone:
<asp:CatalogZone ID="zoneCatalog"
runat="server"
HeaderText="Web
Part Catalog" VerbButtonType="Button">
<ZoneTemplate>
<asp:DeclarativeCatalogPart ID="DeclarativeCatalogPart1" runat="server" Title="Web Parts">
<WebPartsTemplate>
<wpc:smallgridwebpart
id ="grid1"
runat ="server"
chrometype ="None"
title ="test"
GridPageSize="6">
</wpc:smallgridwebpart>
</WebPartsTemplate>
</asp:DeclarativeCatalogPart>
</ZoneTemplate>
</asp:CatalogZone>
The properties of the webPart are not filled, even the ones in the declarative tag (GridPageSize="6").
I have also tried to get the Web Parts from an ascx template:
<asp:CatalogZone ID="zoneCatalog"
runat="server"
HeaderText="Web
Part Catalog" VerbButtonType="Button">
<ZoneTemplate>
<asp:DeclarativeCatalogPart
ID="DeclarativeCatalogPart1"
runat="server"
Title="Web Part
Catalog" WebPartsListUserControlPath="~/WebParts/WebPartCatalog.ascx">
<WebPartsTemplate>
</WebPartsTemplate>
</asp:DeclarativeCatalogPart>
<asp:PageCatalogPart ID="PageCatalogPart1"
runat="server"
Title="Inactive
Web Parts on this Page" />
</ZoneTemplate>
</asp:CatalogZone>
Still no luck...
Any suggestions would be highly appreciated :)
Thank you in advance,
Victor