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

I am using RadTreeView in my WPF application and binding it to an object. Which is working as expected.

Problem: Whenever I add new item in RadTreeView or edit any existing item, I reload my RadTreeView binding object. But I always end up with my either my root node as selected or child of root node. I want my new item (which I have added recently) or edited item to be selected. In my case I have a root node and it can have any number of child node, and those child nodes can have any number of child node. So I have 3 level hierarchy. But after I refresh my binding object (which is TreeViewDataSource in my case) I always end up with my second level and third level never expands.

My XAML code for RadTreeView is:

<Grid >
                            <Grid.Resources>
                                <!--Data template for the Sensor object-->
                                <HierarchicalDataTemplate x:Key="SensorTemplate">
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="/MORASS;component/Images/Sensor.png" />
                                        <TextBlock Text="{Binding SensorName}" Margin="2" />
                                    </StackPanel>
                                </HierarchicalDataTemplate>
                                <!--Data template for the Logger object-->
                                <!--<Image Source="/MORASS;component/Images/Logger.png">-->
                                <HierarchicalDataTemplate x:Key="LoggerTemplate"
                                                          ItemTemplate="{StaticResource SensorTemplate}"
                                                          ItemsSource="{Binding Sensor}">
                                    <StackPanel Orientation="Horizontal">
                                        <Image>
                                            <Image.Style>
                                                <Style TargetType="{x:Type Image}">
                                                    <Style.Triggers>
                                                        <DataTrigger Binding="{Binding IsManualType}" Value="false">
                                                            <Setter Property="Source" Value="/MORASS;component/Images/Logger.png"/>
                                                        </DataTrigger>
                                                        <DataTrigger Binding="{Binding IsManualType}" Value="true">
                                                            <Setter Property="Source" Value="/MORASS;component/Images/Logger-Manual.png"/>
                                                        </DataTrigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </Image.Style>
                                        </Image>
                                        <TextBlock Text="{Binding LoggerDescription}" Margin="2" />
                                    </StackPanel>
                                </HierarchicalDataTemplate>
                                <!--Data template for the Location object-->
                                <HierarchicalDataTemplate  
                                        x:Key="LocationTemplate"  
                                        ItemsSource="{Binding Logger}"
                                        ItemTemplate="{StaticResource LoggerTemplate}">
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="/MORASS;component/Images/Location.png" />
                                        <TextBlock Text="{Binding LocationName}" Margin="2" />
                                    </StackPanel>
                                </HierarchicalDataTemplate>
                            </Grid.Resources>
                            <telerik:RadTreeView Name="radTreeViewMain" SelectedItem="{Binding SelectedItemNode}" IsLineEnabled="True" SelectedValuePath="{Binding Type}" SelectionChanged="radTreeViewMain_SelectionChanged"  >
                                <telerik:RadTreeViewItem Header="Locations" IsExpanded="True" ContextMenu="{Binding Source={StaticResource TreeContextMenu}}" ItemsSource="{Binding TreeViewDataSource}" ItemTemplate="{StaticResource LocationTemplate}">
                                    
                                </telerik:RadTreeViewItem>
                            </telerik:RadTreeView>
</Grid>


Any help will be highly appreciated.

Regards,
Moon
Petar Mladenov
Telerik team
 answered on 15 Mar 2012
1 answer
118 views
Hi All,

I am having the  parent RadGridView  and its RowDetailsTemplate has one more RadGridView
As my requirement is to display the data by Type and by classification.  I am binding the both parent and child RadGridView  with ObservableCollection with data refresh interval of 3 seconds. 

Issue is when i expand the child  RadGridView  and able to view data after 3 seconds new data binding entire parent and child GridView rows set to closed state.  ( user is unable to view the data properly )

I want data to refresh automatically and also user need to  expand and view the child rows properly. 

Please help me how to achieve this.  waiting for reply.



Regards,
Vivek
Vivekanand
Top achievements
Rank 1
 answered on 15 Mar 2012
0 answers
71 views
Hi,

I am using RadGridView in WPF application and binding it to a DataTable view. For my RadGridView I have set AutoGenerateColumns as "True" (to get my columns automatically).
 
Problem: In DataTable object (which I am binding to RadDataGridView) I have one DateTime column. In RadDataGridView it only shows Date calender in the dropdown for picking date, but no time. More over I want to change date format for DateTime column. As AutoGenerateColumns  is true, I don't have any control over the columns. Can anyone please show me how to show RadDateTimePicker in RadGridView column when AutoGenerateColumns is True?

My XAML code for RadGridView  is as below:

<telerik:RadGridView Grid.Row="1" AutoGenerateColumns="True" ItemsSource="{Binding ManualDataTable}" IsReadOnly="False" CanUserDeleteRows="True"  Name="radGridViewManualData" ShowInsertRow="True" />

Any help will be highly appreciated.


Regards,
Moon
Moon
Top achievements
Rank 1
 asked on 15 Mar 2012
0 answers
111 views
Public Class Product() {
   Public string Name {get;set;}
  Public ObservableCollection<Price> Prices {get;set;}
}
 
Public Class Price()
{
  Public decimal(12,4) Amount1{get;set;} 
  Public decimal(12,4) Amount2{get;set;}
  Public string Source {get;set;}
}

If my RadGrid's DataContext is an ObservableCollection of Product.
I open the RadExpressionEditor, with an Item.

Is the any way in the Fields view to see the properties of Price, when I select Prices.

It would be very useful for a user creating a Prices.Sum() to see they have multiple properties available. 

Jason
Top achievements
Rank 1
 asked on 14 Mar 2012
1 answer
129 views
Dear Telerik Team,

I'm using the latest ScheduleView Control and have a small issue.

Appointments in my AppointmentDataSource which have a longer duration than 24 hours,
are always shown as AllDayEvents (in AllDayEventArea) - also when i set the isAllDayEvent Property to false.

Is this a known issue ? Is there a workaround ?

kind regards
Markus 
Rosi
Telerik team
 answered on 14 Mar 2012
1 answer
120 views
I have a GridView that I'm binding to a custom collection of custom objects.  In this GridView, I need to bind a ComboBoxColumn to a set of values in a different collection.

For example,

I've created a VB.NET List(of String) that holds the names of states. My class that the grid is bound to has a State property.  I want to bind the states column to that List(of String) collection so that the user sees the dropdown of all available options when editing the particular record.


My List(Of String) is defined in a Module, and thus accessible as a global variable in the app.  The custom class comes from a different library, and doesn't know anything about the list of states.

  I can't seem to get the ItemsSource of the ComboBoxColumn to bind to something defined in a Module.  Is such a scenario allowed?

Dimitrina
Telerik team
 answered on 14 Mar 2012
0 answers
85 views
Hi,
I saw RadGridView Demo, Edit rows but. i try it not work. can you share some samples.
Thanks.
Vinoth Arun
Top achievements
Rank 2
 asked on 14 Mar 2012
2 answers
327 views
Hi

I've followed this FAQ which explains that to set the Default Style, we can declaratively add the properties in XAML and set "DocumentInheritsDefaultStyle" to true.

I've done this, and open my document and type some text - it's in Times New Roman size 11.  If I add a table, all text added is in Times New Roman 11.

My problem is with tables.  If I check the built in styles TableNormal and TableGrid, they're actually set to Verdana 12.  Strange, then, that my table contains Times New Roman 11 text.

If I copy and paste the table somewhere else in the doument... all text changes to Verdana 12!

If anyone could explain:
- why copy and paste causes this change.  Surely if a table is a certain style or has certain overriden local values, they should remain?
- the difference between "TableNormal" and "TableGrid", and why we can't delete either via the UI.  And why, if I open a document without a TableGrid style, it creates one.
Iva Toteva
Telerik team
 answered on 14 Mar 2012
1 answer
76 views

Hi, not sure if I found a bug:

When in the range of the slot indicates a busy year earlier, in my case proved 1753 (First year sql server). Schedule performance drops significantly.

Slot slot = this.CreateWorkingSlot(new DateTime(1753, 1, 1, 9, 0, 0), new DateTime(1753, 1, 1, 13, 0, 0), RecurrenceDays.Monday | RecurrenceDays.Tuesday | RecurrenceDays.Wednesday | RecurrenceDays.Thursday | RecurrenceDays.Tuesday); 


 I'm afraid you do a loop in reverse.

Sorry for my english and thanks,

Konstantina
Telerik team
 answered on 14 Mar 2012
3 answers
130 views
Hi!

When I use the Metro-Theme and place a RadGridView inside a RadTabItem the text inside the Grid becomes white on a white background. What is going wrong here? We are using 2011-Q2-SP1 controls.On the screenshot you can see that there IS some data inside the grid but it can't be seen.

Regards
Neils
Tina Stancheva
Telerik team
 answered on 14 Mar 2012
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
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?