Private
Sub GetControlNames(ByVal oControl As Object)
Try
If IsNothing(oControl) Then GoTo lable1
Dim child As Object
If sSelectedControl = child.GetType.Name Then
cmbControlsName.Items.Add(child.Name)
End If
GetControlNames(child)
Catch ex As Exception
ShowMessage(ex.Message)
End Try
End Sub
Note: I have the above said two ComboBoxes and a Frame in one Page and the Frame will load another page namely Page1 in it. The content of the Frame will be passed as the argument for the above function.
Here, I have used the Recursive function(well you know). When the RadGridView is passed as the argument of the function, it jumps to the label "lable1" from "For Each" statement. So, it means the RadGridView doesn't have children. Then, how can I get the MenuItem I've used under RadGridView. Please let me know the solution.
Thanks and Regards,
Azharshah H
Software Developer
public class AppointmentTaskVm : Appointment { private int _appointmentTaskId; private bool _isBasketItem; private int _position; private int? _taskId; public int AppointmentTaskId { get { return _appointmentTaskId; } set { _appointmentTaskId = value; OnPropertyChanged("AppointmentTaskId"); } } public bool IsBasketItem { get { return _isBasketItem; } set { _isBasketItem = value; OnPropertyChanged("IsBasketItem"); } } public int Position { get { return _position; } set { _position = value; OnPropertyChanged("Position"); } } public int? TaskId { get { return _taskId; } set { _taskId = value; OnPropertyChanged("TaskId"); } } public override IAppointment Copy() { var newAppointment = new AppointmentTaskVm(); newAppointment.CopyFrom(this); return newAppointment; } public override void CopyFrom(IAppointment other) { var task = other as AppointmentTaskVm; if (task != null) { AppointmentTaskId = task.AppointmentTaskId; IsBasketItem = task.IsBasketItem; Position = task.Position; TaskId = task.TaskId; } base.CopyFrom(other); } }Hi,
I am trying to select values from a bounded combobox inside a GridView.
But after a select it and try to select other the previous selected value is not visible.
below is code in xaml :-
<telerik:RadGridView Margin="5,0,0,0" Grid.Row="4" Grid.ColumnSpan="2" Name="gvGISMapFields" Width="610" ShowColumnHeaders="True" ShowGroupPanel="False" Height="250">
<telerik:RadGridView.Columns>
<telerik:GridViewComboBoxColumn Name="MatchingField" DisplayMemberPath="MatchingField" UniqueName="MatchingField" HeaderText="Target Field" IsFilterable="False" IsGroupable="False" IsReorderable="False" IsSortable="False" TextAlignment="Center" Width="250"/>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
below is code in xaml.cs :-
GridViewComboBoxColumn matchingField = (GridViewComboBoxColumn)gvMapFields.Columns[1];
matchingField.ItemsSource = matchingGISFields;
<telerik:RadComboBox ItemsSource="{Binding}" DisplayMemberPath="Name" x:Name="cboCurrencyList" />Source="{Binding ElementName=cboCurrencyList, Path=SelectedValue}"/>public class CalendarButtonTemplateSelector : DataTemplateSelector { public override DataTemplate SelectTemplate(object item, DependencyObject container) { CalendarButtonContent content = item as CalendarButtonContent; if (content != null && content.ButtonType == CalendarButtonType.Date) { if (CentralCalendarWindow.CalendarViewItems != null && CentralCalendarWindow.CalendarViewItems.Exists(c => c.Date == content.Date)) { CalendarViewItem calendarViewItem = CentralCalendarWindow.CalendarViewItems.Find(c => c.Date == content.Date); if (calendarViewItem.IsHoliday) { return HolidayTemplate; } } } } }<DataTemplate> <StackPanel> <TextBlock Text="{Binding Text}" /> <TextBlock Text="{Binding CustomText}" /> </StackPanel> </DataTemplate>Hi,