1
Aşağıdaki konuda biraz yardım/açıklama/açıklama istiyorum: RadioButton grubu için bir etkinlik nasıl kaydedilir?
BirExpander
iç içe bir
TreeView
öğe var, farklı dallanma seçeneklerine dayalı barındıran
RadioButton
kontrolleri, aynı özellik değiştirilmesi gerekir. Radyo düğmeleri hepsi aynı gruba atanır.
<Expander x:Name="expanderInterestStructure" Header="Interest Structure" HorizontalAlignment="Left" Margin="10,138,0,0" VerticalAlignment="Top" Width="132" BorderThickness="0">
<Grid Margin="0,0,10,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TreeView x:Name="inputInterestStructureSelection" Margin="0,0,-131,-177" Grid.RowSpan="2">
<TreeViewItem Grid.Row="0" Grid.Column="0" Header="360">
<RadioButton x:Name="_360fixed" GroupName="interestStructure" Tag="360fixed" Content="Fixed Interest" IsChecked="True"/>
<TreeViewItem Header="Compund Interest">
<RadioButton x:Name="_360compDay" GroupName="interestStructure" Tag="360compDay" Content="Daily"/>
<RadioButton x:Name="_360compMonth" GroupName="interestStructure" Tag="360compMonth" Content="Monthly"/>
<RadioButton x:Name="_360compQuater" GroupName="interestStructure" Tag="360compQuater" Content="Quaterly"/>
<RadioButton x:Name="_360compYear" GroupName="interestStructure" Tag="360compYear" Content="Yearly"/>
</TreeViewItem>
</TreeViewItem>
<TreeViewItem Grid.Row="1" Grid.Column="0" Header="365/366">
<RadioButton x:Name="_365fixed" GroupName="interestStructure" Tag="365fixed" Content="Fixed Interest"/>
<TreeViewItem Header="Compund Interest">
<RadioButton x:Name="_365compDay" GroupName="interestStructure" Tag="365compDay" Content="Daily"/>
<RadioButton x:Name="_365compMonth" GroupName="interestStructure" Tag="365compMonth" Content="Monthly"/>
<RadioButton x:Name="_365compQuater" GroupName="interestStructure" Tag="365compQuater" Content="Quaterly"/>
<RadioButton x:Name="_365compYear" GroupName="interestStructure" Tag="365compYear" Content="Yearly"/>
</TreeViewItem>
</TreeViewItem>
</TreeView>
</Grid>
</Expander>
soru, nasıl bu grubunu ve izleyen bir olay kayıt olabilirsiniz olduğu grup üyeleri değişiklikler arasında seçim, seçilen ürün etiketi veya isme bir dize özelliğini teşkil eder mi?
Şimdiden teşekkürler!
ben her radyo düğmesini bu işlemek gerekir inanıyoruz:
İçini tüm mantığı koyabilirsiniz:
neyse, her
RadioButton
aynı olay işleyicisi abone olabilirsiniz Grup seviyesinde değil. AutoPostBack = "True" değerini atamanız ve yönteminizi OnCheckedChanged ile ilişkilendirmeniz gerekir. Buraya bakın: http://stackoverflow.com/questions/8095256/asp-net-radio-button-change –