Telerik Forums
UI for WPF Forum
0 answers
189 views
Hello,

I have a need to refresh data in a nested grid and keep any expanded rows, sorting or filtering.

I am using a nested RadGridView.  I would like to hold onto the explanded rows state, filter state and sort state of the master and detail grids.

I have been somewhat successful, however I cannot find the correct way to re-apply the expanded items and the detail filters/sorting.

I have tried RadGridView1.ItemContainerGenerator.ContainerFromItem but it always comes back empty.  However, the items are populated.

How do I programatically set the row.Isexpanded property using the Items bound to the Itemssource?

How do I re-apply any sorting or filtering to children grids?

Thank you,
Rick
Rick Knicely
Top achievements
Rank 1
 asked on 22 Nov 2010
6 answers
292 views
Hi,

Is it possible to have the aggregate function's source field pointed to a Path?
My data source is generated dynamically so I'm trying to use the Path approach like in DataMemberBinding.

Thanks.


<
telerik:GridViewDataColumn Header="Field 1" Width="120" 
      DataMemberBinding="{Binding Mode=TwoWay, Path=Columns[1]}" DataFormatString="{}{0:N2}" >
    <telerik:GridViewDataColumn.AggregateFunctions>
       <telerik:SumFunction Caption="Sum: " SourceField="{Path=Columns[1]}" ResultFormatString="{}{0:N2}"/>
    </telerik:GridViewDataColumn.AggregateFunctions>
</telerik:GridViewDataColumn>
Miguel Peixoto
Top achievements
Rank 1
 answered on 22 Nov 2010
5 answers
461 views
Hello

I try to use the RadPanelBar with a Binding as ItemSource, but get an unexpected result. Without binding I would use it like this:
<telerik:RadPanelBar> 
    <telerik:RadPanelBarItem> 
        <telerik:RadPanelBarItem.Header> 
            <Label Content="Header 1"/> 
        </telerik:RadPanelBarItem.Header> 
        <Label Content="Content 1"/> 
    </telerik:RadPanelBarItem> 
</telerik:RadPanelBar> 

That is no problem and looks exactly as expected. But as soon as I use it like this:
<telerik:RadPanelBar Name="AttributeSetPanelBar" ItemsSource="{Binding}"
    <telerik:RadPanelBar.Resources> 
        <DataTemplate DataType="{x:Type wrp:AttributeSet}"
            <telerik:RadPanelBarItem> 
                <telerik:RadPanelBarItem.Header> 
                    <Label Content="{Binding Name}"/> 
                </telerik:RadPanelBarItem.Header> 
                <Label Content="Content"/> 
            </telerik:RadPanelBarItem> 
        </DataTemplate> 
    </telerik:RadPanelBar.Resources> 
</telerik:RadPanelBar> 
and set it's DataContext to a List of objects (in this case AttributeSet), it changes its behaviour! Now the header includes the whole content, and the content itself (the secont Label) is also displayd as Header.
Am I doing something wrong, or is this a bug?

Regards
Simon
Tina Stancheva
Telerik team
 answered on 22 Nov 2010
8 answers
1.1K+ views
Hello Telerik,

I'm trying to use visual helper to fine and change the textblock in the ContentPresenter in the TileViewItem
RadTileViewItem myRadTileViewItem =(RadTileViewItem)(RadTileView1.ItemContainerGenerator.ContainerFromItem(RadTileView1.Items.CurrentItem));
  
// Getting the ContentPresenter of RadTileView1
ContentPresenter myContentPresenter = FindVisualChild<ContentPresenter>(RadTileView1);
  
// Finding textBlock from the DataTemplate that is set on that ContentPresenter
DataTemplate myDataTemplate = myContentPresenter.ContentTemplate;
TextBlock myTextBlock = (TextBlock)myDataTemplate.FindName("Datext", myContentPresenter);
  
// Do something to the DataTemplate-generated TextBlock
  
    this.Datext.Text = 5;
<DataTemplate x:Key="MyDataTemplate">
                    <StackPanel>
                    <TextBlock x:Name="Datext" FontSize="18" Text="{Binding}" />
                    <TextBox x:Name="Datext1" FontSize="10" Text="5 KillDate Items" />
                    </StackPanel>
                </DataTemplate>
private childItem FindVisualChild<childItem>(DependencyObject obj)
    where childItem : DependencyObject
{
    for (int i = 0; i < VisualTreeHelper.GetChildrenCount(obj); i++)
    {
        DependencyObject child = VisualTreeHelper.GetChild(obj, i);
        if (child != null && child is childItem)
            return (childItem)child;
        else
        {
            childItem childOfChild = FindVisualChild<childItem>(child);
            if (childOfChild != null)
                return childOfChild;
        }
    }
    return null;
}


Any thoughts/

Regards,
Rick
Zarko
Telerik team
 answered on 22 Nov 2010
1 answer
48 views
Following an update to Rad controls for WPF Q3 2010, we've begun to receive the following error: "Could not load file or assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=<hex string>' or one of its dependencies. The system cannot find the file specified. / [OK]"

Platform: Windows 7
NET Framework = Microsoft .NET Framework 4 Client Profile

Further investigation has revealed the the error is resolved when ..NET Framework 4.0 Extended is applied. Is this a known byproduct of the Q3 release of RAD for WPF? If so, is there a way to suppress this additional requirement?

Thanks!

David Stickney
Veselin Vasilev
Telerik team
 answered on 22 Nov 2010
2 answers
136 views
Hi!

Is it possible to configure/change the RadDatePicker to support the dateformat YYYYMMDD (no dashes)?
George
Telerik team
 answered on 22 Nov 2010
3 answers
178 views
I have a RadGridView that I would like users to edit as much as they want, but not to save any changes back to the binding object until the user clicks the save button. For textboxes and such I have used binding groups, but this approach does not seem to work for the RadGridView.

What is the best approach for delayed edits for the entire grid?
Maya
Telerik team
 answered on 22 Nov 2010
1 answer
68 views
I would like to create a custom theme for the calendar of the RadDatePicker. Theming the RadScheduler was easy. But how is this done on the Calendar?

George
Telerik team
 answered on 22 Nov 2010
1 answer
79 views
I´d like to know if it is possible to show the calendar on mousedoubleclick event. I thought this was easy to implement, but I didn´t find any method the would solve my problem.
George
Telerik team
 answered on 22 Nov 2010
6 answers
182 views
Hi,
I experience a weird behavior of the RadGridView with row and column virtualization turned on. At random times, upon setting the ItemsSource property, a single selected row remains 'hanging' in the empty area far down the last row in the grid. I have attatched a screenshot with visual representation of the problem. Turning the virtualization off solves this issue but it's inacceptable due to the large amount of the data that used with the grid. I am using version Q1 SP1 2010 of the grid.
Todor
Top achievements
Rank 1
 answered on 22 Nov 2010
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
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
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?