Example #1
0
        private void ItemIDMultiValue1_SelectionChanged_1(object sender, SelectionChangedEventArgs e)
        {
            if (e.AddedItems.Count == 0)
            {
                return;
            }

            string selectedTable = e.AddedItems[0] as string;

            if (string.IsNullOrEmpty(selectedTable))
            {
                return;
            }

            _TableName = selectedTable;

            ContentFile contentFile = TableContentManager.Instance.GetFileByName(selectedTable);

            if (contentFile != null)
            {
                ItemIDMultiValue2.Items.Clear();
                foreach (ContentRow contentRow in contentFile.ContentRow)
                {
                    if (ContentConfig.IsContentIDInvalid(contentRow.ID))
                    {
                        ItemIDMultiValue2.Items.Add(contentRow.ID);
                    }
                }
            }
            else if (selectedTable == "None")
            {
                _TableName             = "";
                _TableID               = "";
                ItemIDMultiValue1.Text = _TableName;
                ItemIDMultiValue2.Text = _TableID;
                ValidValue();
            }

            //ItemIDMultiValue2.DisplayMemberPath = "DisplayName";
        }