コード例 #1
0
    /// <summary>
    /// External unigrid databound.
    /// </summary>
    protected object VariantGrid_OnExternalDataBound(object sender, string sourceName, object parameter)
    {
        DataRowView row = (DataRowView)parameter;

        switch (sourceName)
        {
        case UniGrid.SELECTION_EXTERNAL_DATABOUND:

            // Disable checkbox if variant already exists
            if (ExistingItems.Contains(ValidationHelper.GetString(row["RowNumber"], string.Empty)))
            {
                CMSCheckBox chkBox = (CMSCheckBox)sender;
                chkBox.Enabled = false;
            }

            break;
        }

        return(parameter);
    }