Alex
-
7/13/2011 3:48:48 PM
Problem to adding custom field into Group profile
Please help to write correct code.
I neet add custom field GroupProgram into Group Profile
1. I add this field into system table Community_Group class Community.Group throw CMS Site Manager / Development / System tables 2. After in file ~\CMSModules\Groups\Controls\GroupEdit.ascx I add new custom field and add code into SaveData() class
------------------------ if (group != null) { if (this.DisplayAdvanceOptions) { // Update Group fields group.GroupDisplayName = displayName; group.GroupName = codeName; group.GroupNodeGUID = ValidationHelper.GetGuid(this.groupPageURLElem.Value, Guid.Empty); }
if ((AllowChangeGroupDisplayName) && (IsLiveSite)) { group.GroupDisplayName = displayName; }
group.GroupDescription = this.txtDescription.Text; group.GroupProgram = this.txtProgram.Text; group.GroupAccess = GetGroupAccess(); group.GroupSiteID = this.SiteID; group.GroupApproveMembers = GetGroupApproveMembers(); group.GroupSendJoinLeaveNotification = this.chkJoinLeave.Checked; group.GroupSendWaitingForApprovalNotification = this.chkWaitingForApproval.Checked; this.groupPictureEdit.UpdateGroupPicture(group);
---------------
But error accured
Compiler Error Message: CS1061: "CMS.Community.GroupInfo" does not contain a definition for "GroupProgram". and no extension method "GroupProgram", accepting a first argument of type "CMS.Community.GroupInfo" could be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 342: Line 343: group.GroupDescription = this.txtDescription.Text; Line 344: group.GroupProgram = this.txtProgram.Text; Line 345: group.GroupAccess = GetGroupAccess(); Line 346: group.GroupSiteID = this.SiteID;
Source File: c:\inetpub\KenticoCMS\CMSModules\Groups\Controls\groupedit.ascx.cs Line: 344
How can I solve this error?
Version of Kentico v5.5.4125 R2
|