protected void SFFilter_DropDownList1_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ForeignModelEventArgs fmea = new ForeignModelEventArgs();
                fmea.returnResults = null;
                fmea.foreignKeyModel = Column.FieldName;
                fmea.keyType = ForeignModelEventArgs.LoadForeignTableByKey;

				this.Page.RegisterAsyncTask(new PageAsyncTask(async () =>
				{
					if (this.ForeignKey != null) 
					{
						SFFilter_DropDownList1.Items.Clear();
						SFFilter_DropDownList1.Items.Add(new ListItem("All", ""));
						await this.ForeignKey(fmea);
						PopulateListControl(SFFilter_DropDownList1, fmea.returnResults, Column.ForeignField);
					
						string defaultValue = "";
                        FilterLoadEventArgs flea = new FilterLoadEventArgs();
                        flea.FilterDefaults = null;
                        this.OnFilterLoad(flea);

						SFFilter_DropDownList1.SelectedIndex = 0;
                        if (flea.FilterDefaults != null)
                        {
                            flea.FilterDefaults.TryGetValue(Column.FieldName, out defaultValue);
                            if (defaultValue != null) {
                                SFFilter_DropDownList1.SelectedValue = defaultValue;
                            }
                        }
					}
				}));
            }
        }
		public async Task ForeignKeyEventHandler_LoadForeignKey(ForeignModelEventArgs e)
        {
            e.returnResults = await _repository.GetForeignListAsync(e.foreignKeyModel, e.keyType);
        }
		protected void DropDownList1_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ForeignModelEventArgs fmea = new ForeignModelEventArgs();
                fmea.returnResults = null;
                fmea.foreignKeyModel = DataTypeName;
				fmea.keyType = ForeignModelEventArgs.LoadForeignTableByModel;

				this.Page.RegisterAsyncTask(new PageAsyncTask(async () =>
				{
					if (this.ForeignKey != null) {
						await this.ForeignKey(fmea);
						PopulateListControl(fmea.returnResults, DataValueField, DataTextField);
					}
				}));
            }
        }
		public void ForeignKeyEventHandler_LoadForeignKey(ForeignModelEventArgs e)
        {
            e.returnResults = _repository.GetForeignList(e.foreignKeyModel, e.keyType);
        }