Example #1
0
        public void OnSaveChange(SPField field, bool isNew)
        {
            TotalsRollupField myField = field as TotalsRollupField;

            if (isNew)
            {
                myField.UpdateListName(ddlList.SelectedItem.Text);
                myField.UpdateListQuery(txtQuery.Text);
                myField.UpdateAggType(ddlType.SelectedValue);
                myField.UpdateAggColumn(ddlColumn.SelectedValue);
                myField.UpdateLookupColumn(ddlLookup.SelectedValue);
                myField.UpdateDecimals(ddlDecimals.SelectedValue);
                myField.UpdateOutputType(ddlOutput.SelectedValue);
            }
            else
            {
                myField.ListName     = ddlList.SelectedItem.Text;
                myField.ListQuery    = txtQuery.Text;
                myField.AggType      = ddlType.SelectedValue;
                myField.AggColumn    = ddlColumn.SelectedValue;
                myField.LookupColumn = ddlLookup.SelectedValue;
                myField.Decimals     = ddlDecimals.SelectedValue;
                myField.OutputType   = ddlOutput.SelectedValue;
            }
        }
Example #2
0
        public void InitializeWithField(SPField field)
        {
            TotalsRollupField myField = field as TotalsRollupField;

            if (myField != null)
            {
                this.list       = myField.ListName + "";
                this.query      = myField.ListQuery + "";
                this.aggtype    = myField.AggType + "";
                this.column     = myField.AggColumn + "";
                this.lookup     = myField.LookupColumn + "";
                this.decimals   = myField.Decimals + "";
                this.outputtype = myField.OutputType + "";
            }
        }