radRichTextBox.Document.MailMergeDataSource.ItemsSource = GetMyList()
I need to databind ItemsSource to my list which is in the ViewModel.
Thank you in advance
Hi
When i double click on dates in radcalendar,the selected date should get added.But the date should not get added while double click on the header,navigation arrows and week days? when i click on the arrows to change month, if i do this to fast, the control fires a "double click" event.
Is there any way to decide if i clicked a date or some other place on the control?
Thanks & Regards
Kotteeswari
List<ClsDataOfTreeListItem> Items = new List<ClsDataOfTreeListItem>() ;
foreach (Telerik.Windows.Controls.TreeListView.TreeListViewRow row in myTreeListView.ChildrenOfType<Telerik.Windows.Controls.TreeListView.TreeListViewRow>())
{
if(row.IsExpanded==true)
Items.Add( (ClsDataOfTreeListItem)row.Item);
}
//then i refresh data from the database
GetData() //this populates data with refreshed contents from DB
//after refresh, expand the same items again by collected information
//the problem is, that this time the foreach loop doe not find any rows
foreach (Telerik.Windows.Controls.TreeListView.TreeListViewRow row in
myTreeListView.ChildrenOfType<Telerik.Windows.Controls.TreeListView.TreeListViewRow>())
{
foreach (ClsDataOfTreeListItem itm in Items)
{
ClsDataOfTreeListItem tmpItem = (ClsDataOfTreeListItem)row.DataContext;
if (itm.ID == tmpItem.ID)
row.IsExpanded = true;
}
}
//after the operation, the UI is refreshed and the items not expanded, because the foreach loop did not find any rows after data refresh from db.
Why does the foreach loop detect any rows after data refresh? Is there any way to refresh the UI programmatically before trying to espand as it origanally was? Rebind after data refresh dide not help. Is there any "datarefreshed" event that I could use (the tmpItems could be stored and used in event handler if there is good one for this purpose)?
Is there any other ways to get and set the original expanded information (and the scrolled position if possible).?
<
DataTemplate
x:Key
=
"headerTemplate"
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
telerik:RadButton
Width
=
"14"
Height
=
"14"
Margin
=
"0 0 0 0"
HorizontalAlignment
=
"Center"
VerticalAlignment
=
"Center"
Content
=
"X"
FontSize
=
"10"
Foreground
=
"Black"
Background
=
"White"
Command
=
"{Binding Path=DataContext.RemoveTileCommand, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
CommandParameter
=
"{Binding RelativeSource={RelativeSource AncestorType=telerik:RadTileViewItem}}"
Padding
=
"0"
/>
<
TextBlock
x:Name
=
"TileHeader"
FontSize
=
"10"
Text
=
"{Binding Path=DataContext.DataContext.TileCaption, RelativeSource={RelativeSource AncestorType=telerik:RadTileViewItem}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
HorizontalAlignment
=
"Left"
/>
</
StackPanel
>
</
DataTemplate
>