public void InitializeWithField(SPField field)
{
if (!IsPostBack)
{
ChildDropDownListField ChildField = field as ChildDropDownListField;
if (ChildField != null)
{
childSiteUrl = ChildField.ChildSiteUrl;
childListName = ChildField.ChildListName;
childListTextField = ChildField.ChildListTextField;
childListValueField = ChildField.ChildListValueField;
childJoinField = ChildField.ChildJoinField;
EnsureChildControls();
if (string.IsNullOrEmpty(txtSiteURL.Text) && !string.IsNullOrEmpty(childSiteUrl))
{
txtSiteURL.Text = childSiteUrl;
loadLists();
ddlLists.Items.FindByText(childListName).Selected = true;
refreshLookups();
ddlColumnText.Items.FindByText(childListTextField).Selected = true;
ddlColumnValue.Items.FindByText(childListValueField).Selected = true;
ddlColumnJoin.Items.FindByText(childJoinField).Selected = true;
}
}
}
}
{
if (!IsPostBack)
{
ChildDropDownListField ChildField = field as ChildDropDownListField;
if (ChildField != null)
{
childSiteUrl = ChildField.ChildSiteUrl;
childListName = ChildField.ChildListName;
childListTextField = ChildField.ChildListTextField;
childListValueField = ChildField.ChildListValueField;
childJoinField = ChildField.ChildJoinField;
EnsureChildControls();
if (string.IsNullOrEmpty(txtSiteURL.Text) && !string.IsNullOrEmpty(childSiteUrl))
{
txtSiteURL.Text = childSiteUrl;
loadLists();
ddlLists.Items.FindByText(childListName).Selected = true;
refreshLookups();
ddlColumnText.Items.FindByText(childListTextField).Selected = true;
ddlColumnValue.Items.FindByText(childListValueField).Selected = true;
ddlColumnJoin.Items.FindByText(childJoinField).Selected = true;
}
}
}
}