Telerik Forums
UI for WPF Forum
1 answer
156 views
Hi Telerik,

I am very new to wpf telerik controls. I am using richtextbox. I learn how to add customize text from code behind. But how can I add customize text from ViewModel.

Regards

Animesh
Iva Toteva
Telerik team
 answered on 25 Oct 2011
7 answers
656 views
Hi,

Is it possible to have a RadPane automatically fit to the size of the control its in? I'm guessing this would need to be done at the RadSplitContainer level. Any suggestions?

Thanks!
George
Telerik team
 answered on 25 Oct 2011
2 answers
169 views
Hi there,

I'm having difficulty figuring out how to bind my data ( ObservableCollection(of) ) and to display it as a hierarchy using vb.

I have the following example data, similar to your C# example I saw in another post called Treelistview-Self-Hierarchy.

ID             Name               ParentID
1               John                 NULL                   ** Top level node **
2               Chris                1                      ** Parent is John **
3               Simon                NULL                   ** Top level node **
4               Dave                 1                      ** parent is John **
5               Joe                  3                      ** parent is simon **

** Please note again that the above is an ObservableCollection(Of ) list.

I have the following XAML List view.

<telerik:RadTreeListView x:Name="ParksTreeListView" AutoGenerateColumns="False" IsFilteringAllowed="True" IsBusy="False">
    <telerik:RadTreeListView.Columns>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding ID}"
                            Header="ID" />
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"
                            Header="Name" />
        <telerik:GridViewDataColumn DataMemberBinding="{Binding ParentID}"
                            Header="Parent" />
    </telerik:RadTreeListView.Columns>
</telerik:RadTreeListView>

I then set the ItemsSource in VB:

'Get parks information from SQL database
Dim parksList As ObservableCollection(Of ParksTree) = ParksDB.GetAllParks()
  
'Set Tree items source
ParksTreeListView.ItemsSource = parksList

This displays all the information correctly in grid. However I need to group the items according to it's hierarchy.How can I achieve this with the minimal of fuss?
** Please note I am a newbie! **

Out of interest, the hierachy in my SQL 2008 database uses the new hierarchyid data type. Can the TreeListView use the hierarchyid data directly to generate the tree nodes?
Robert
Top achievements
Rank 1
 answered on 24 Oct 2011
2 answers
506 views
Hello, I'm having trouble figuring out how to add a button dynamically in a radgridview.

I'm porting over working code that used the stock WPF DataGrid control.  This is the method I *used* to use:

  private DataGridTemplateColumn GetButtonColumn(IListPropertyInfo i)
       {
           var buttonTemplate = new FrameworkElementFactory(typeof(Button));          
           buttonTemplate.SetBinding(Button.ContentProperty, new Binding(i.columnName));
           buttonTemplate.SetValue(Button.StyleProperty, DefaultStyles.GridColumnButtonStyle); 

           buttonTemplate.AddHandler(
              Button.ClickEvent,
              new RoutedEventHandler((o, e) => HandleColumnButtonClick(o, e))
          );

           DataGridTemplateColumn c = new DataGridTemplateColumn();
           c.SortMemberPath = i.columnName;
           c.CellTemplate=new DataTemplate() { VisualTree = buttonTemplate };
           AddHeader(c,i);
           return c;
       }

Trying to replicate this using the RadGridView is giving me all sorts of problems, I think I'm going about it entirely wrong so I won't even post my failed attempts as I'm getting all sorts of bizarre errors.

How do I accomplish adding a button column dynamically in code to a RadGridView and setting it to my own event handler (there is an example on here but it's done in xaml and doesn't add an event handler for the button)?

Any help greatly appreciated.
JC
Top achievements
Rank 1
 answered on 24 Oct 2011
1 answer
110 views
In the C# Code behind, how do you set the selected item to an item already in the control. My XAML is

<telerik:RadOutlookBar x:Name="RadOutlookBar"
                     Grid.Column="0"
                     SelectedItem="{Binding SelectedSection, Mode=TwoWay}">
  
</telerik:RadOutlookBar>

So in the view model, I want to iterate through all the Items, find one, then set the control's selected item to it. How do you iterate over the items collection?
Tina Stancheva
Telerik team
 answered on 24 Oct 2011
2 answers
162 views
My question is identical to this one: http://www.telerik.com/community/forums/preview-thread/wpf/gridview/raddatapager-radgridview-refresh.aspx, but unfortunately, the original poster who claimed to have solved it didn't actually post what he did. :-\

I have a RadDataPager bound to

ObservableCollection<Foo> Bar
.
<telerik:RadDataPager x:Name="radDataPager" Source="{Binding Bar}"/>

I have a listbox that has its ItemsSource set to:

<ListBox ItemsSource="{Binding PagedSource, ElementName=radDataPager}"/>

When the underlying collection 'Bar' changes, those changes aren't being reflected in the listbox and I'm not sure why.

Any thoughts?

thanks.

mike
Michael Eaton
Top achievements
Rank 1
 answered on 24 Oct 2011
0 answers
112 views
How would you evaluate an expression generated by the editor without needing to pass it to the RadGridView?

Thanks!

Ron
Ron
Top achievements
Rank 1
 asked on 24 Oct 2011
0 answers
132 views
Hi,

I want to add a context menu for the timeslot in the scheduleview. If I add a contextmenu for the scheduleview, I get context menu everywhere in the control (like GroupHeader, NavigationPanel, etc). But I need the menu only in Timeslot..Please help...

With Regards,
Jeyakumar
jeya
Top achievements
Rank 1
 asked on 24 Oct 2011
1 answer
138 views
Hi,
While i am trying to set the

row.Visibility =

Visibility.Collapsed;

 

then blank spaces appears accross the row in my TreeListView. I do nt want to show the row based on my condition. How i will be able to accomplish that. Please help me.

My requirement is if the row.Level = 3 and row does not have children then i do not need to show that row. My tree can be expanded upto 7th level.

if

 

(objBind.Level == 3 &&  objBind.Items.Count == 0)

 

{

row.Visibility =

Visibility.Collapsed;

 

row.Height = 0.0;

}

Vlad
Telerik team
 answered on 24 Oct 2011
4 answers
115 views

Here, I store the contents of my RadRichTextBox in my database.

For storage I must thus use an export. And, for displaying an importation.

I use all the functions suggested by your RadRichTextBox, primarily:
- MergeField
- Tables
- Image

The concern, it is that according to the provider used, I lose one or more information, has to know:
- DocxProvider, I loses the size of the tables and I lose the style of MergeField
- RtfProvider, I loses MergeField
- XamlProvider, if I use MergeField I have an error message at the time of the importation Boat create Telerik.Windows.Documents.Modele

I
would prefer not to use RtfProvider, indeed, it stock the images with format BMP and that takes too much place.


Could
you indicate good walk to me to be followed?
Joël
Top achievements
Rank 2
 answered on 24 Oct 2011
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?