Telerik Forums
UI for WPF Forum
4 answers
320 views
Hello I am trying to create a simple RadGridView based UserControl. I am getting all the data to display but cannot seem to get any attributes to set on the Child Grid. I've created a template grid for the child grid but it always seems to AutoGenerateColumns and ignore my column definitions along with any specific attributes at the Grid level.

Here is my Control w/ Grid:

<UserControl x:Class="CCIGrid02.Views.WbsUserControl"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:viewModels="clr-namespace:MetaEstimatingProject.ViewModels;assembly=MetaEstimatingProject"
             mc:Ignorable="d"
             d:DesignHeight="480" d:DesignWidth="640">
    <Grid>
        <Grid.Resources>
            <viewModels:WbsViewModel x:Key="WbsViewModel" />
            <DataTemplate x:Key="RowDetailsTemplate">
                <telerik:RadGridView Name="valsgrid" AutoGenerateColumns="False" CanUserDeleteRows="True" CanUserInsertRows="True"
                                     ShowInsertRow="True" ShowGroupPanel="False"
                                     Width="640" Height="480">
                    <telerik:RadGridView.Columns>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Code}" Width="100"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Description}" Width="250"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Notes}" Width="500"/>
                    </telerik:RadGridView.Columns>
                </telerik:RadGridView>
            </DataTemplate>
 
        </Grid.Resources>
         
        <telerik:RadGridView x:Name="gridView" ItemsSource="{Binding WbsKeys, Source={StaticResource WbsViewModel}}"
                             RowDetailsTemplate="{StaticResource RowDetailsTemplate}"
                             AutoGenerateColumns="False" ShowInsertRow="True" ShowGroupPanel="False">           
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Key}" Header="Wbs Key" UniqueName="WbsKey" MinWidth="125"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Description}" Header="Description" UniqueName="WbsDesc" MinWidth="175"/>
            </telerik:RadGridView.Columns>
            <telerik:RadGridView.ChildTableDefinitions>
                <telerik:GridViewTableDefinition>
                    <telerik:GridViewTableDefinition.Relation>
                        <telerik:PropertyRelation ParentPropertyName="Values" />
                    </telerik:GridViewTableDefinition.Relation>
                </telerik:GridViewTableDefinition>
            </telerik:RadGridView.ChildTableDefinitions>
             
             
        </telerik:RadGridView>
    </Grid>
</UserControl>

Pretty simple right out of the example on the documentation.

Here is my Data objects I populate with mock data for testing:

public class WbsKey {
     #region C'tors
 
     public WbsKey() {
         Key = "EmptyKey";
         Description = "Empty Desc";
         Values = new List<WbsValue>();
     }
 
     public WbsKey(string key)
     {
         Key = key;
         Description = "Empty Desc";
         Values = new List<WbsValue>();
     }
 
     public WbsKey(string key, string description) {
         Key = key ?? "EmptyKey";
         Description = description ?? "Empty Desc";
         Values = new List<WbsValue>();
     }
 
     public WbsKey(string key, List<WbsValue> values) {
         Key = key ?? "EmptyKey";
         Values = values ?? new List<WbsValue>();
     }
 
     #endregion
 
     #region Instance Properties
 
     public string Key { get; set; }
     public string Description { get; set; }
     public List<WbsValue> Values { get; set; }
      
     #endregion
 }
public class WbsValue {
     #region C'tors
 
     public WbsValue() {
     }
 
     public WbsValue(string code, string description) {
         Code = code;
         Description = description;
     }
 
     public WbsValue(string code, string description, string notes) {
         Code = code;
         Description = description;
         Notes = notes;
     }
 
     #endregion
 
     #region Instance Properties
 
     public string Code { get; set; }
     public string Description { get; set; }
     public string Notes { get; set; }
 
     #endregion
 }

I also attached a screen shot of what I am talking about in the application.

If you look at the XAML I have these important attributes I need in the Details Grid:
<DataTemplate x:Key="RowDetailsTemplate">
                <telerik:RadGridView Name="valsgrid" AutoGenerateColumns="False" CanUserDeleteRows="True" CanUserInsertRows="True"
                                     ShowInsertRow="True" ShowGroupPanel="False"
                                     Width="640" Height="480">
                    <telerik:RadGridView.Columns>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Code}" Width="100"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Description}" Width="250"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Notes}" Width="500"/>
                    </telerik:RadGridView.Columns>
                </telerik:RadGridView>
            </DataTemplate>

The user does not need to see the Grouping bar and also should be able to add new rows, almost identical to the parent Grid.

I'd appreciate any advice. Thanks!


Rob
Top achievements
Rank 1
 answered on 16 Oct 2014
5 answers
201 views
Hello,

I have noticed when zooming on silverlight map control that objects are hidden when zooming.
Is there any way how to achieve that behavior on WPF map control by turning on/off some property or how to does it in different way?

Thx, Vlada
Petar Mladenov
Telerik team
 answered on 16 Oct 2014
2 answers
176 views
Hi,

I would like to know how it's possible to detect when the current page change??? I create a UserControl which contain a RadPdfViewer and when the visible page change I would like to throw an event to inform the UI.

Thank's
Alain
Christie Admin
Top achievements
Rank 1
 answered on 16 Oct 2014
2 answers
233 views
Hello,

My issue is visible in the last telerik WPF demo, in the sample called "AutoCompleteBox : Multiselection with autocompletebox".

After adding some box in the control, I remove one with the "cross button", everything works fine, but when I move my cursor outside of the control, the caret get stuck, and I need to click in order to have my normal pointer back.


Do you have any ideas how to solve this behavior ?

Regards, 
Nasko
Telerik team
 answered on 16 Oct 2014
3 answers
140 views
I'm trying to write a custom drag drop behaviour, and as I understand it I start by deriving a class from Telerik.Windows.Controls.DragDropBehavior. The problem is Telerik.Windows.Controls doesn't seem to contain the class DragDropBehavior. Have I completely misunderstood something?
Kalin
Telerik team
 answered on 16 Oct 2014
2 answers
354 views
Good day,

I'm wondering how can I fix wrong positioning (you can see how does it look right now in attached picture) of RadDiagramShapes in TreeDown? When I have like 5 nodes it works quite OK. But when i have let's say 90 nodes it becomes a mess.

I use this code after i fill RadDiagram with shapes and after i connect them with each other.
TreeLayoutSettings settings = new TreeLayoutSettings()
{
    TreeLayoutType = TreeLayoutType.TreeDown,
};
settings.Roots.Add(rd.Shapes[0]);
  
rd.RoutingService.Router = new OrgTreeRouter()
{
    TreeLayoutType = TreeLayoutType.TreeDown,
    ConnectionOuterSpacing = 20,
};
rd.LayoutAsync(LayoutType.Tree, settings);
rd.AutoFitAsync(new Thickness(0, 0, 0, 0), false);


I have only one root and I have already tried with positioning root shape on some position. Also i tried to fit layout after each diagram was put on diagram.

Thanks for your help.

Regards,

Gregor
Zarko
Telerik team
 answered on 16 Oct 2014
6 answers
512 views
Hello,

I have some problems with controls which inherit from Telerik Control like RadOutlookBarItem, RadRibbonTab...

When I try to switch the style at runtime (merging of xaml dictionaries), the style is not changed.

When there are no inheritance, it works great.

How can I solve that ?

Thanks in advance.

Geoffrey
Geoffrey
Top achievements
Rank 1
 answered on 16 Oct 2014
10 answers
728 views
Hello,
I want implement a GridView with the funcionality of add new entries on specific positions. For sample, the grid will be loaded with five static rows, and the user just can add a new row above it. This way, the new row created by the user can be deleted or a new row can be added above it again. So, basically is this: the pre-loaded rows are statics, can´t be deleted, and the new rows can be deleted or a new row can be created above it.
How could I create a new row always above other row? In the nameOfGrid.BeginInsert() method the new row is created on the bottom of grid. 

I´ve attached two images to demonstrate the desired behavior. The first one shows the static rows pre-loaded, just with the option to add a new row. The second shows a new row created on the bottom of grid, with the option to add and remove a row. 

Thanks in advance,

Thiago
Dimitrina
Telerik team
 answered on 16 Oct 2014
1 answer
259 views
Hello,

I need the filtered and sorted results from a RadGridView Control. RadGridView.Items contains the sorted/filtered/etc. data as DataItemCollection but I wonder if I could get the results as IEnumerable<T> and not as DataItemCollection. I need to have this because I am bound to a specific API.

I know I could cast it using RadGridView.Items.Cast<SpecificType>(); but I do not know the specific type because it is determined at runtime.

Thanks in advance
Boris
Telerik team
 answered on 15 Oct 2014
2 answers
342 views
Hi,
Can you please point me to an example of a RadTreeView inside of RadComboBox?
Is there an equivalent of RadDropDownTree in WPF?
Thank you.
Kristina
Telerik team
 answered on 15 Oct 2014
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?