Aspx Markup kodu:
<ext:RadioGroup ID="rgWillBeScheduling" runat="server" ColumnsNumber="2" AllowBlank="false"
StyleSpec="padding-left:10px; padding-top:10px;">
<Items>
<ext:Radio runat="server" ID="Radio1" BoxLabel="Evet">
<CustomConfig>
<ext:ConfigItem Name="inputValue" Value="'EVET'">
</ext:ConfigItem>
</CustomConfig>
<Listeners>
<Check Handler=" if(el.checked){ Ext.getCmp('extpnlScheduleInfos').show(); }" />
</Listeners>
</ext:Radio>
<ext:Radio runat="server" ID="Radio2" BoxLabel="Hayır">
<CustomConfig>
<ext:ConfigItem Name="inputValue" Value="'HAYIR'">
</ext:ConfigItem>
</CustomConfig>
<Listeners>
<Check Handler=" if(el.checked){ Ext.getCmp('extpnlScheduleInfos').hide(); } " />
</Listeners>
</ext:Radio>
</Items>
</ext:RadioGroup>
<ext:Panel ID="extpnlScheduleInfos" runat="server" Border="false" Hidden="true" HideMode="Display" HideParent="true" >
<Body>
<table cellpadding="0" cellspacing="0" border="0" id="tableCizelgelemeBilgileri"
style="">
<tr>
<td style="width: 160px;" align="right">
<ext:Label ID="Label28" runat="server" Text="Çizelgeleme Zamanı ve Periyodu:">
</ext:Label>
</td>
<td style="width: 210px;">
<ext:TextField ID="tfScheduleDateAndPeriod" runat="server" AllowBlank="false" Width="210px">
</ext:TextField>
</td>
<td style="width: 15px;" class="cssTdStar">
<asp:Label ID="Label29" runat="server" Text="*"></asp:Label>
</td>
</tr>
<tr>
<td style="width: 160px;" align="right">
<ext:Label ID="Label30" runat="server" Text="Raporun Dağıtılıcağı Mail Adresleri:">
</ext:Label>
</td>
<td style="width: 210px;">
<ext:TextField ID="tfMailAddressesToSendReport" runat="server" AllowBlank="false" Width="210px">
</ext:TextField>
</td>
<td style="width: 15px;" class="cssTdStar">
<asp:Label ID="Label31" runat="server" Text="*"></asp:Label>
</td>
</tr>
</table>
</Body>
</ext:Panel>
Server-Side Kod:
protected void buttonComplete_Click(object sender, Coolite.Ext.Web.AjaxEventArgs e)
{
if (newPPMRequest.WillBeScheduling.ToString().ToUpperInvariant().Equals("EVET"))newPPMRequest.WillBeScheduling = rgWillBeScheduling.Items[0].Checked ? "EVET" : "HAYIR"; // EVET 0. index oluyor //rgWillBeScheduling.CheckedItems[0].Value.ToString();
{
newPPMRequest.ScheduleDateAndPeriod = tfScheduleDateAndPeriod.Text;
newPPMRequest.MailAddressesToSendReport = tfMailAddressesToSendReport.Text;
}
}
Burada rgWillBeScheduling.Items[0].Checked sürekli false olarak gelmekte veya rgWillBeScheduling.CheckedItems koleksiyonu hiç dolmamaktadır.
Markup kodunda radio item'lerine tanımlanan custom config tanımlamaları kaldırılırsa sorun düzelmektedir.
<CustomConfig>
<ext:ConfigItem Name="inputValue" Value="'EVET'">
</ext:ConfigItem>
</CustomConfig>
<CustomConfig>
<ext:ConfigItem Name="inputValue" Value="'HAYIR'">
</ext:ConfigItem>
</CustomConfig>
Hiç yorum yok:
Yorum Gönder