Example #1
0
        public static void InitEdit(this RepositoryItemPopupContainerEdit edit, List <GridColumn> columns, object dataSource, string displayName, bool isMarkCheck)
        {
            edit.QueryResultValue += edit_QueryResultValue;
            edit.EditValueChanged += edit_EditValueChanged;
            edit.QueryDisplayText += edit_QueryDisplayText;
            PopupContainerControlExtention sample = new PopupContainerControlExtention(columns, dataSource, displayName, isMarkCheck);

            sample.Tag = edit;
            edit.Properties.PopupControl = sample;
            sample.BindData(dataSource);
        }
Example #2
0
        public static void InitEdit(this RepositoryItemPopupContainerEdit edit, string layoutEntityName, string filterEntityName, bool isMarkCheck, CriteriaOperator filter)
        {
            edit.QueryResultValue += edit_QueryResultValue;
            edit.EditValueChanged += edit_EditValueChanged;

            edit.QueryDisplayText += edit_QueryDisplayText;
            PopupContainerControlExtention sample = new PopupContainerControlExtention(layoutEntityName, filterEntityName, isMarkCheck, filter);

            sample.Tag = edit;
            edit.Properties.PopupControl = sample;
            sample.BindData(null);
        }
Example #3
0
        public static void InitEdit(this PopupContainerEdit edit, string layoutEntityName, string filterEntityName, bool isMarkCheck, CriteriaOperator filter)
        {
            if (!isMarkCheck)
            {
                edit.Popup += (sender, e) =>
                {
                    PopupContainerEdit editValue = sender as PopupContainerEdit;
                    if (editValue == null)
                    {
                        return;
                    }
                    PopupContainerControlExtention popupSample = editValue.Properties.PopupControl as PopupContainerControlExtention;
                    if (popupSample == null)
                    {
                        return;
                    }
                    popupSample.SetRowFocus();
                };
                edit.QueryResultValue += (sender, e) =>
                {
                    PopupContainerEdit editValue = sender as PopupContainerEdit;
                    if (editValue == null)
                    {
                        return;
                    }
                    PopupContainerControlExtention popupSample = editValue.Properties.PopupControl as PopupContainerControlExtention;
                    if (popupSample == null)
                    {
                        return;
                    }
                    var selectedList = editValue.GetSelection();
                    if (selectedList.Count > 0)
                    {
                        e.Value = selectedList[0];
                    }
                };
                edit.EditValueChanged += (sender, e) =>
                {
                    PopupContainerEdit editValue = sender as PopupContainerEdit;
                    if (editValue == null)
                    {
                        return;
                    }
                    PopupContainerControlExtention popupSample = editValue.Properties.PopupControl as PopupContainerControlExtention;
                    if (popupSample == null)
                    {
                        return;
                    }
                    popupSample.LoadUserData();
                };

                edit.QueryDisplayText += (sender, e) =>
                {
                    PopupContainerEdit editValue = sender as PopupContainerEdit;
                    if (editValue == null)
                    {
                        return;
                    }
                    PopupContainerControlExtention popupSample = editValue.Properties.PopupControl as PopupContainerControlExtention;
                    if (popupSample == null)
                    {
                        return;
                    }
                    e.DisplayText = GetPopupEditText(popupSample);
                };
            }
            PopupContainerControlExtention sample = new PopupContainerControlExtention(layoutEntityName, filterEntityName, isMarkCheck, filter);

            sample.SelectionChanged += new PopupContainerControlExtention.SelectionChangedEventHandler(SelectionChanged);
            sample.Tag = edit;
            edit.Properties.PopupControl = sample;
            sample.BindData(null);
        }