Dec 03, 2010, 3:21 PM
[CLOSED] Problem with 1.0 RC edition
Hello , we have a problem with 1.0 rc edition . when we hide and show some controls on server side , some controls are disappearing.
capture2.png which is attached shows the initial state. after clicking ctlKurumTipCheckBox , ctlKurumTipCheckBox is disappearing that shown in 1.png . my CheckBox_Checked method hides only comboboxes. same codes work with 0.86 edition perfectly.
capture2.png which is attached shows the initial state. after clicking ctlKurumTipCheckBox , ctlKurumTipCheckBox is disappearing that shown in 1.png . my CheckBox_Checked method hides only comboboxes. same codes work with 0.86 edition perfectly.
<ext:FitLayout ID="FitLayout1" runat="server">
<Items>
<tt:TTPanel Layout="form" runat="server" ID="ctlBaseFormPanel" BodyBorder="false"
Border="false" AnchorHorizontal="100%" Padding="5" AutoHeight="true" Title="Kural Parametreleri">
<Items>
<tt:TTCompositeField runat="server" ID="ctlKurumCompositeField" AnchorHorizontal="100%" LabelSource="UseFieldLabel">
<Items>
<tt:TTCheckBox runat="server" FieldLabel="" ID="ctlKurumCheckBox" Checked="true">
<DirectEvents>
<Check OnEvent="CheckBox_Checked">
</Check>
</DirectEvents>
</tt:TTCheckBox>
<ttd:TTEntityCombo runat="server" FieldLabel="Kurum" ID="ctlKurumCombo" TableDisplayField="Ad"
TableValueField="ID" TableName="Kurum" ForceSelection="true" TypeAhead="true">
</ttd:TTEntityCombo>
</Items>
</tt:TTCompositeField>
<tt:TTCompositeField runat="server" ID="ctlKurumTipCompositeField" AnchorHorizontal="100%" LabelSource="UseFieldLabel">
<Items>
<tt:TTCheckBox runat="server" FieldLabel="" ID="ctlKurumTipCheckBox">
<DirectEvents>
<Check OnEvent="CheckBox_Checked">
</Check>
</DirectEvents>
</tt:TTCheckBox>
<ttd:TTEntityCombo runat="server" FieldLabel="Kurum Tipi" ID="ctlKurumTipCombo" TableDisplayField="Ad"
TableValueField="ID" TableName="KurumTip" ForceSelection="true" TypeAhead="true" Hidden="true">
</ttd:TTEntityCombo>
</Items>
</tt:TTCompositeField>
</Items>
</tt:TTPanel>
</Items>
</ext:FitLayout>
public partial class CorporationRuleControl : RuleUIBusiness<CorporationRuleParameter>
{
protected void Page_Load(object sender, EventArgs e)
{
ctlKurumCombo.DataBind();
ctlKurumTipCombo.DataBind();
}
public void CheckBox_Checked(object sender, DirectEventArgs e)
{
TTCheckBox cbox = (TTCheckBox)sender;
bool check = cbox.Checked;
if (cbox.ID == "ctlKurumCheckBox")
{
ctlKurumTipCheckBox.Checked = !check;
HideControls(!check);
}
else
{
ctlKurumCheckBox.Checked = !check;
HideControls(check);
}
}
private void HideControls(bool check)
{
ctlKurumCombo.Hidden = check;
ctlKurumTipCombo.Hidden = !check;
}
public override void FillUI(CorporationRuleParameter entity)
{
ctlKurumCombo.Clear();
ctlKurumTipCombo.Clear();
ctlKurumCombo.SelectedAsNullableInt = entity.KurumID;
ctlKurumTipCombo.SelectedAsNullableInt = entity.KurumTipID;
base.FillUI(entity);
}
public override CorporationRuleParameter RetrieveFromUI()
{
if (ctlKurumCombo.SelectedAsInt < 1 && ctlKurumTipCombo.SelectedAsInt < 1)
throw new BusinessException("Bir Kurum veya Kurum Tip Seçilmelidir");
Current.KurumID = ctlKurumCombo.SelectedAsNullableInt;
Current.KurumTipID = ctlKurumTipCombo.SelectedAsNullableInt;
return Current;
}
}
Regards.
Last edited by Daniil; Dec 29, 2010 at 8:43 PM.
Reason: Marked as [CLOSED]. No more information was provided.