Telerik Forums
UI for WPF Forum
7 answers
683 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
183 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
522 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
118 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
171 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
123 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
140 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
144 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
118 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
3 answers
80 views
Hello

We are using the RadGridView to show hierarchical data X levels deep. Typically this is only used up until 5 or 6 levels deep.
We use the RowChildTemplate where we define other radgridviews that display the collections of children (loaded on demand)

Now, the problem is that when we expand a top level node that has a lot of items (2000+), it takes a very long time for the UI to update (> 2 mins) and afterwards the application is very unresponsive + takes up a lot of memory. I have a suspicion this is because the child gridview containing the 2000+ items is actually in the first row, of which a part is shown in the UI obviously. So even if only the top row + 2 or 3 rows of the child gridview is visible in the UI, the other 2997 rows of the child gridview are still instantiated because they are "part of" the top level row so virtualization is not used on "sublevels".
Is this a known problem and do you (or anyone) perhaps have a workaround for this? This is a blocking problem for us...
Vlad
Telerik team
 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
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
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
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?