Telerik Forums
UI for WPF Forum
7 answers
115 views

Hello, 

I need to update te value of a cell in my radgrid view. When I try to change it the grid does not uptate its value until I reagroup or manipulate the grid in any other way

This is my code:

selectedItem = TryCast(Me.rgv_attributes.Items.Item(0), c_accionAtributo)
Me.rgv_attributes.Items.EditItem(selectedItem)
selectedItem.Value = "algo"
Me.rgv_attributes.Items.CommitEdit()


The itemsource is an ObservableCollection(Of c_accionAtributo) 
Me.rgv_attributes.ItemsSource = atributes


Any help?

Thanks!





Daniel
Top achievements
Rank 1
 answered on 07 Aug 2013
0 answers
121 views
Hi Experts,

I have a RadGridView with HierarchyChildTemplate relationship in my WPF application, here i want to expand a parent Row and highlight a child row. Also i want to bring that record at the top of my Grid in button click event.

We are able to expand the Parent row but we are not able to highlight the Child row, please let me know how to access the Child Grid and highlight the Row.

This is very urgent for us, so help us asap.

Thanks in advance,
Bharathi.
Bharathi
Top achievements
Rank 1
 asked on 07 Aug 2013
2 answers
121 views
Hello,

Is there any way that I can bind to the Filtered Source so that I can update something else on my control only when th Filtered Source changes.  I'm currently listening to all of the filter descriptor collection events, but the filtered source doesn't update until after all of those events fire when removing a filter.  So if I could do something like dataFilter.FilteredSource.DataChanged += blahblah it would make everything a lot easier.

Thanks,
Aaron
Aaron
Top achievements
Rank 1
 answered on 07 Aug 2013
4 answers
406 views
I have a page based wpf application, where a user enters information and clicks on a "Next" button, and is brought to a new page, passing the information along.  When the second page is reached, I want to dynamically add tab(s), group(s), and wrappanel(s), based on how many inputs they submitted.  I am trying the following, but it is exceptioning out with the following error:

Layout measurement override of element 'Telerik.Windows.Controls.RibbonView.Primitives.RibbonGroupsPanel' should not return PositiveInfinity as its DesiredSize, even if Infinity is passed in as available size.

Code:
             RadOrderedWrapPanel checkpointwrap = new RadOrderedWrapPanel();
            checkpointwrap.Name = "ckwrap";

            RadRibbonGroup checkpointgroup = new RadRibbonGroup();
            checkpointgroup.Name = "ckp_" + "2";
            checkpointgroup.Items.Add(checkpointwrap);
            checkpointgroup.Header = "GroupTest";

            RadRibbonTab checkpointtab = new RadRibbonTab();
            checkpointtab.Name = "CKP1";
            checkpointtab.Items.Add(checkpointgroup);

            this.Grid1.Children.Add(checkpointtab);
Pavel R. Pavlov
Telerik team
 answered on 07 Aug 2013
3 answers
94 views
While the user types into the input field, changes are only "commited" (to the SelectedValue property) when the control loses focus or when the user hits "Enter".

Is there a simple way to check if the control's status is currently "committed" or "not-committed" (i. e. the user has typed something into the box but hasn't hit Enter or activated another control) without to resorting to value comparisons (which would mean to parse Date values etc. which I want to avoid)?
Kalin
Telerik team
 answered on 07 Aug 2013
1 answer
122 views
I'm creating a nested grid view that is three levels deep. I have a parent and a child grid with the child grid containing a tab control with two additional grids. The grids and everything load properly, however the buttons in the tab items are never being displayed (Add Hedging Default and Add Tank Bottom).
Do you see anything wrong with the XAML that would prevent them from being displayed? I've removed the stack panel, tried other buttons, set the size explicitly, etc without any change. 

At this point I'm at a loss of where to go from here.

Thank you


<
Grid DataContext="{StaticResource VmTerminalConfiguration}" Name="rootWindow" >
     <Grid.Resources>
         <DataTemplate x:Key="ChildRowDetailsTemplate">
 
             <telerik:RadTabControl x:Name="tabControl" telerik:TouchManager.IsTouchHitTestVisible="False">
 
                 <telerik:RadTabItem Header="Hedging Defaults" Name="hedgingDefaultsTabItem">
                     <Grid x:Name="LayoutWhite" Background="White">
                         <Grid.RowDefinitions>
                             <RowDefinition Height="Auto" />
                             <RowDefinition Height="*" />
                         </Grid.RowDefinitions>
 
                         <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="0" Margin="0,5,0,5">
                             <telerik:RadButton Content="Add New Hedging Default" Click="AddHedgingDefaultButton_Click" Width="150" Margin="0,0,5,0" />
                         </StackPanel>
 
 
                         <telerik:RadGridView Grid.Row="1" Name="hedgingDefaultRadGridView" GroupRenderMode="Flat"
                          ItemsSource="{Binding TerminalConfigurationHedgingDefaultVMs}"
                          Foreground="Black" Height="250" RowIndicatorVisibility="Collapsed"
                          AutoGenerateColumns="False" CanUserFreezeColumns="False" BorderThickness="0"
                          CanUserResizeColumns="False" ShowGroupPanel="False" BorderBrush="{x:Null}" Margin="0"
                          EditTriggers="CellClick" CellEditEnded="CellEditEnded">
                             <telerik:RadGridView.Resources>
                                 <Style x:Key="GridViewToggleButtonColumnStyle" TargetType="telerik:GridViewCell">
                                     <Setter Property="Padding" Value="0,0,0,0" />
                                 </Style>
                             </telerik:RadGridView.Resources>
                             <telerik:RadGridView.Columns>
 
                                 <telerik:GridViewComboBoxColumn Header="Product" DataMemberBinding="{Binding ParentCommodityID}"
                                             SelectedValueMemberPath="CommodityID" DisplayMemberPath="CommodityName" ItemsSource="{Binding AllParentCommodities,ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}" />
                                 <telerik:GridViewComboBoxColumn Name="cmbReceiptHedgingDefault" Header="Receipt" DataMemberBinding="{Binding ReceiptHedgingDefault, Mode=TwoWay, ValidatesOnDataErrors=True}"
                                                                             ItemsSource="{Binding DefaultOptions}" />
                                 <telerik:GridViewComboBoxColumn Name="cmbOtherHedgingDefault" Header="Other" DataMemberBinding="{Binding OtherHedgingDefault, Mode=TwoWay, ValidatesOnDataErrors=True}"
                                                                             ItemsSource="{Binding DefaultOptions}" />
                                 <telerik:GridViewComboBoxColumn Name="cmbScheduleHedgingDefault" Header="Schedule" DataMemberBinding="{Binding ScheduleHedgingDefault, Mode=TwoWay, ValidatesOnDataErrors=True}"
                                                                             ItemsSource="{Binding DefaultOptions}" />
                                 <telerik:GridViewDataColumn Name="dpHedgingDefaultEffectiveDate" Header="Effective Date" DataMemberBinding="{Binding EffectiveDate, StringFormat=d, ValidatesOnDataErrors=True}" Width="150" />
                             </telerik:RadGridView.Columns>
 
 
                         </telerik:RadGridView>
                     </Grid>
                 </telerik:RadTabItem>
                 <telerik:RadTabItem Header="Tank Bottoms" Name="tankBottomsTabItem">
                     <Grid Background="White">
                         <Grid.RowDefinitions>
                             <RowDefinition Height="Auto" />
                             <RowDefinition Height="*" />
                         </Grid.RowDefinitions>
                         <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="0" Margin="0,5,0,5">
                             <telerik:RadButton Content="Add New Tank Bottom" Click="AddTankBottomButton_Click" Width="150" Margin="0,0,5,0" />
                         </StackPanel>
                         <telerik:RadGridView Grid.Row="1" x:Name="tankBottomRadGridView" GroupRenderMode="Flat"
                          ItemsSource="{Binding TerminalConfigurationTankBottomVMs}"
                          Foreground="Black" Height="250" RowIndicatorVisibility="Collapsed"
                          AutoGenerateColumns="False" CanUserFreezeColumns="False" BorderThickness="0"
                          CanUserResizeColumns="False" ShowGroupPanel="False" BorderBrush="{x:Null}" Margin="0"
                                              EditTriggers="CellClick" CellEditEnded="CellEditEnded">
                             <telerik:RadGridView.Resources>
                                 <Style x:Key="GridViewToggleButtonColumnStyle" TargetType="telerik:GridViewCell">
                                     <Setter Property="Padding" Value="0,0,0,0" />
                                 </Style>
                             </telerik:RadGridView.Resources>
                             <telerik:RadGridView.Columns>
                                 <telerik:GridViewComboBoxColumn Header="Product" DataMemberBinding="{Binding ParentCommodityID}"
                                             SelectedValueMemberPath="CommodityID" DisplayMemberPath="CommodityName" ItemsSource="{Binding AllParentCommodities,ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}" />
                                 <telerik:GridViewDataColumn Name="txtTankBottom" Header="Tank Bottom" DataMemberBinding="{Binding Bottom,ValidatesOnDataErrors=True}" Width="150" />
                                 <telerik:GridViewDataColumn Name="dpTankBottomEffectiveDate" Header="Effective Date" DataMemberBinding="{Binding EffectiveDate, StringFormat=d, ValidatesOnDataErrors=True}" Width="150" />
                             </telerik:RadGridView.Columns>
                         </telerik:RadGridView>
                     </Grid>
                     <!--<local:TerminalInventoryGridCommentView />-->
                 </telerik:RadTabItem>
             </telerik:RadTabControl>
         </DataTemplate>
         <DataTemplate x:Key="RowDetailsTemplate">
             <Grid>
             
                 <Grid.RowDefinitions>
                     <RowDefinition Height="Auto" />
                     <RowDefinition Height="*" />
                 </Grid.RowDefinitions>
                 <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="0" Margin="0,5,0,5">
                     <telerik:RadButton Content="Add New Terminal" Click="AddTerminalButton_Click" Width="150" Margin="0,0,5,0" />    
                 </StackPanel>
 
                 <telerik:RadGridView Grid.Row="1"  HorizontalAlignment="Stretch" Name="terminalGridView" VerticalAlignment="Stretch"
                          ItemsSource="{Binding TerminalConfigurationTerminalVMs}"
                          Margin="0" GroupRenderMode="Flat" RowIndicatorVisibility="Collapsed" IsReadOnly="False" AutoGenerateColumns="False"
                          CanUserFreezeColumns="False" CanUserResizeColumns="False" ColumnWidth="*" RowDetailsTemplate="{StaticResource ChildRowDetailsTemplate}"
                          AllowDrop="True" IsFilteringAllowed="False" CanUserReorderColumns="True" CanUserDeleteRows="False" CanUserSortColumns="False" CanUserSortGroups="False"
                          ShowGroupPanel="False" EditTriggers="CellClick" CellEditEnded="CellEditEnded">
             
                     <telerik:RadGridView.Columns>
                         <telerik:GridViewToggleRowDetailsColumn/>
                         <telerik:GridViewComboBoxColumn Name="cmbTerminalName" Header="Name" DataMemberBinding="{Binding TerminalID}"
                                             SelectedValueMemberPath="TerminalID" DisplayMemberPath="TerminalName" ItemsSource="{Binding AllTerminals, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}" Width="150"/>
                         <telerik:GridViewDataColumn Name="dpTerminalStartDate" Header="Start Date" DataMemberBinding="{Binding StartDate, StringFormat=d, ValidatesOnDataErrors=True, Mode=TwoWay}" Width="150" />
                         <telerik:GridViewDataColumn Name="dpTerminalEndDate" Header="End Date" DataMemberBinding="{Binding EndDate, StringFormat=d, ValidatesOnDataErrors=True, Mode=TwoWay}" Width="150" />
 
 
                     </telerik:RadGridView.Columns>
                 </telerik:RadGridView>
             </Grid>
         </DataTemplate>
     </Grid.Resources>
      
     <Grid>
         <Grid.RowDefinitions>
             <RowDefinition Height="Auto" />
             <RowDefinition Height="*" />
         </Grid.RowDefinitions>
 
         <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="0" Margin="0,5,0,5">
             <telerik:RadButton Content="Add New Delivery Area" Click="AddDeliveryAreaButton_Click" Width="150" Margin="0,0,5,0" />
             <telerik:RadButton Content="Save Changes" Click="SaveChangesButton_Click" Width="150" Margin="0,0,5,0" />
         </StackPanel>
 
         <telerik:RadGridView Grid.Row="1"  HorizontalAlignment="Stretch" Name="parentGridView" VerticalAlignment="Stretch"
                          ItemsSource="{Binding TerminalConfigurationDeliveryAreaVMs}"
                          Margin="0" GroupRenderMode="Flat" RowIndicatorVisibility="Collapsed" IsReadOnly="False" AutoGenerateColumns="False"
                          CanUserFreezeColumns="False" CanUserResizeColumns="False" ColumnWidth="*" RowDetailsTemplate="{StaticResource RowDetailsTemplate}"
                          AllowDrop="True" IsFilteringAllowed="False" CanUserReorderColumns="True" CanUserDeleteRows="False" CanUserSortColumns="False" CanUserSortGroups="False"
                          ShowGroupPanel="False" EditTriggers="CellClick" CellEditEnded="CellEditEnded">
 
             <telerik:RadGridView.Columns>
                 <telerik:GridViewToggleRowDetailsColumn/>
                 <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding DeliveryAreaName}" />
                 <telerik:GridViewComboBoxColumn Name="cmbInventoryRegion" Header="Region" DataMemberBinding="{Binding InventoryRegion,Mode=TwoWay, ValidatesOnDataErrors=True}"
                                             ItemsSource="{Binding AllInventoryRegions}" />
                 <telerik:GridViewCheckBoxColumn Name="cbInactive" Header="Inactive" DataMemberBinding="{Binding Inactive}" />
 
             </telerik:RadGridView.Columns>
 
         </telerik:RadGridView>
 
     </Grid>
 
 </Grid>
Dimitrina
Telerik team
 answered on 07 Aug 2013
1 answer
133 views
Hi,

I've read at documentation and at several forum entries that RadTransitionControl could be used as a Prism region because it inherits form ContentControl.

However, I'm trying to do this with no success. Here is my code:
<telerik:RadTransitionControl Grid.Column="3" Grid.Row="1" prism:RegionManager.RegionName="{x:Static common:RegionNames.MainRegion}">
                <telerik:RadTransitionControl.Transition>
                    <telerik:SlideAndZoomTransition/>
                </telerik:RadTransitionControl.Transition>
            </telerik:RadTransitionControl>
When calling RegionManager.RequestNavigate(RegionNames.MainRegion, myView) nothing appears at MainRegion (changing RadTransitionControl  by ContentControl it works as expected)

Any idea?

Thanks
George
Telerik team
 answered on 07 Aug 2013
2 answers
173 views
I have a need to support the dragging of images (.JPG files) from Windows Explorer and dropping them onto a TileView (creating a new tile with that image).  I've seen examples of dragging and dropping items originating in a Telerik control (ie, a TreeView or ListBox) and dropping them to a TileView, but nothing where the source originates outside the application containing the TileView control.  I've set the TileView's OnDrop property and have a OnDrop handler, but the handler never gets invoked when the image is dropped on the TileView.  Any help would be greatly appreciated.

Kevin
Top achievements
Rank 1
 answered on 06 Aug 2013
2 answers
124 views
Hi,

I tried to work with bound Properties on ConnectorShapes.
This works fine - as Long as I do not clear the InternalItems / InternalLinks in the Graph source.

First the Style (part of it)
<Style TargetType="telerik:RadDiagramConnection" >
        <!---->
        <Setter Property="Visibility" Value="{Binding Visibility, Mode=TwoWay}" />
        <!---->

Now my (simple) classes:
(forget about INPBase - it's just an implementation of INotifyPropertyChanged
The Node:
public class Item : INPBase {
        #region Content
        private string _Content;
        public string Content {
            get { return _Content; }
            set { Set(ref _Content, value); }
        }
        #endregion
    }


The Link:
public class Link : INPBase, ILink<Item> {
    public Visibility Visibility { get; set; }
    public Item Source { get; set; }
    public Item Target { get; set; }
 
    object ILink.Source {
        get { return ((object)Source); }
        set { if (!((object)Source).Equals(value)) { Source = value as Item; } }
    }
    object ILink.Target {
        get { return ((object)Target); }
        set { if (!((object)Target).Equals(value)) { Target = value as Item; } }
    }
    public Link() { Visibility = Visibility.Visible; }
}


The Tree:
public class TestTree : INPBase, IGraphSource {
        public ObservableCollection<Item> InternalItems { get; private set; }
        public ObservableCollection<Link> InternalLinks { get; private set; }
        public Item RootNode { get; private set; }
        public System.Collections.IEnumerable Items {           get { return (InternalItems); }     }
        public IEnumerable<ILink> Links {           get { return(InternalLinks); }      }
 
        public TestTree() {
            InternalItems = new ObservableCollection<Item>();
            InternalLinks = new ObservableCollection<Link>();
            BuildTree();
        }
        private void BuildTree() {
            RootNode = new Item() { Content = "One" };
            Item iTwo = new Item() { Content = "Two" };
            Item iThree = new Item() { Content = "Three" };
            Item iFour = new Item() { Content = "Four" };
            InternalItems.Add(RootNode);
            InternalItems.Add(iTwo);
            InternalItems.Add(iThree);
            InternalItems.Add(iFour);
            InternalLinks.Add(new Link() { Target = RootNode, Source = iTwo });
            InternalLinks.Add(new Link() { Target = RootNode, Source = iThree });
            InternalLinks.Add(new Link() { Target = RootNode, Source = iFour });
        }
        public void RebuildTree() {
            InternalLinks.Clear();
            InternalItems.Clear();
            BuildTree();
        }
        public void AddNodeWithLink() {
            Item iNew = new Item() { Content = "I" + InternalItems.Count.ToString() };
            Item iSource = InternalItems.First();
            InternalItems.Add(iNew);
            InternalLinks.Add(new Link() { Target = iSource, Source = iNew });
        }
    }


Last not Least I have a "ViewModel" like this:
public class TestVM : INPBase {
    private TestTree _TestTree;
    public TestTree TestTree {
        get { return _TestTree; }
    }
    public TestVM() {
        _TestTree = new TestTree();
    }
    public void AddNode() {
        _TestTree.AddNodeWithLink();
    }
    public void Rebuild() {
        _TestTree.RebuildTree();
    }
 
}
(of course in real code things are handled via commands - but that doesn't matter)


Everything works fine - as long as I'm not resetting the tree.
After this I get the debug message:

System.Windows.Data Error: 40 : BindingExpression path error: 'Visibility' property not found on 'object' ''TestVM' (HashCode=61656587)'. BindingExpression:Path=Visibility; DataItem='TestVM' (HashCode=61656587); target element is 'RadDiagramConnection' (Name=''); target property is 'Visibility' (type 'Visibility')


So it seems as if clearing the collections move the datacontext "on step up".
My Binding is simple the UserControl (hosting the diagram) has an Instance of TestVM as DataContext and the Diagram is bound like this:
<Grid DataContext="{Binding}" x:Name="grdHolder">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Button Content="Add node" VerticalAlignment="Center" HorizontalAlignment="Left" Click="AddNode_Click" />
        <Button Content="Rebuild" VerticalAlignment="Center" HorizontalAlignment="Center" Click="Rebuild_Click" />
        <Button Content="Layout" VerticalAlignment="Center" HorizontalAlignment="Right" Click="Layout_Click" />
        <telerik:RadDiagram x:Name="dG" GraphSource="{Binding TestTree}" Grid.Row="1"/>
    </Grid>

Thank you
Manfred


ManniAT
Top achievements
Rank 2
 answered on 06 Aug 2013
1 answer
288 views
I'm using radtabcontrol and added another screen(pending screen) as grid in the radcontrolItem like this,

Radcontrol.xaml
<telerik:RadTabItem  >
                    <telerik:RadTabItem.Content>
                     
 
                            <Grid  Name="displaypending" >
                                <Grid.RowDefinitions>
 
                                    <RowDefinition Height="*" />
 
                                </Grid.RowDefinitions>
 
                            </Grid>
                    
                    </telerik:RadTabItem.Content>
                </telerik:RadTabItem>

Radcontrol.xaml.cs

if (displaypending != null)
              {
                  displaypending.Children.Clear();
                  Pending pending = new Pending();
                  displaypending.Children.Add(pending);
                  IsScanningAllowed = ApplicationVariables.IsScannerInitiated;
                }

RadtabItem Content Header will be changed based on button click of pending screen, but i can't able to get changed header immediately after the button click, i need to reload the screen manually to get the changed header. So how to get the changed header without manually reload.
Pavel R. Pavlov
Telerik team
 answered on 06 Aug 2013
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
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
Rob
Top achievements
Rank 3
Bronze
Bronze
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
Bronze
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?