Telerik Forums
UI for WPF Forum
1 answer
120 views
Below is a shortened (some columns/styling removed) Grid I am workingon, I am trying to have an external source set IsReadOnly on the Parent and hierarchical grid.

The binding sets "cueSheetGrid" to IsReadOnly (InEditMode is a propery from DataContext) but the child grid (EventView) remains editable, I have not found a way to bind the child to the parent grid and the ItemSource is different for the two grids.

Any ideas?

 
<tGrid:RadGridView 
    IsReadOnly="{Binding InEditMode}"                      
    x:Name="cueSheetGrid"
    HorizontalAlignment="Stretch" 
    RowDetailsVisibilityMode="Collapsed" 
    AlternationCount="0" 
    RowIndicatorVisibility="Collapsed" 
    DragElementAction="None" 
    AreRowDetailsFrozen="False" 
    CanUserFreezeColumns="True" >
      
    <tGrid:RadGridView.ChildTableDefinitions>
        <tGrid:GridViewTableDefinition>
            <tGrid:GridViewTableDefinition.Relation>
                <tData:PropertyRelation 
                    ParentPropertyName="CueEvents"/>
            </tGrid:GridViewTableDefinition.Relation>
        </tGrid:GridViewTableDefinition>
    </tGrid:RadGridView.ChildTableDefinitions>
      
    <tGrid:RadGridView.Columns>
        <tGrid:GridViewDataColumn 
            DataMemberBinding="{Binding CueNum}" 
            Header="Cue Number  "/>
        <tGrid:GridViewDataColumn 
            DataMemberBinding="{Binding Label}"
            Header="Label  "/>
    </tGrid:RadGridView.Columns>
      
      
    <tGrid:RadGridView.HierarchyChildTemplate>
        <DataTemplate>
            <tGrid:RadGridView
                x:Name="EventView"
                ItemsSource="{Binding CueEvents}" 
                HeaderRowStyle="{DynamicResource MyHeaderRowStyle}"
                Style="{DynamicResource GridStyleDefault}"
                RowStyle="{DynamicResource EventRowStyle}"
                AlternateRowStyle="{DynamicResource EventAltRowStyle}"                        
                AlternationCount="2" >
                  
                <tGrid:RadGridView.Columns>
                    <tGrid:GridViewDataColumn
                        IsReadOnly="True"
                        DataMemberBinding="{Binding Machine.Name}"
                        Header="Machine  "/>
                    <tGrid:GridViewDataColumn
                        DataMemberBinding="{Binding Position}"
                        Header="Position  "/>
                    <tGrid:GridViewDataColumn
                        DataMemberBinding="{Binding Position}"
                        Header="Position  "/>
                </tGrid:RadGridView.Columns>
                  
            </tGrid:RadGridView>
        </DataTemplate>
    </tGrid:RadGridView.HierarchyChildTemplate>
</tGrid:RadGridView>
Stuart Cotts
Top achievements
Rank 1
 answered on 19 Dec 2010
6 answers
135 views
hi!

I have a XBAP project for web, and I have a Page that shows a telerik components. I have a RadWindow as a usercontrol in this way:

<telerikNavigation:RadWindow x:Class="App_ControlLibrary.frmDialogoEntradaDatos"
             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:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
             xmlns:lr="clr-namespace:App_ControlLibrary"
             telerik:StyleManager.Theme="Windows7"
             Height="181" Width="410" BorderBackground="#FF4B72B1" BorderBrush="#FF0C0F21" ResizeMode="NoResize" Header="{x:Static lr:resxDialogoEntradaDatos.titDialogo}">
    <Grid>
        <Grid.Background>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FF80A1E4" Offset="0"/>
                <GradientStop Color="White" Offset="0.5"/>
                <GradientStop Color="#FF5C86DC" Offset="1"/>
                <GradientStop Color="#FFA8C5FF" Offset="0.139"/>
                <GradientStop Color="#FFA6C3FF" Offset="0.787"/>
            </LinearGradientBrush>
        </Grid.Background>
        <StackPanel Width="Auto" Height="Auto" Orientation="Horizontal">
            <StackPanel Width="64" Height="Auto" HorizontalAlignment="Left" VerticalAlignment="Center">
                <Image Source="Imagenes/Interrogante.png" Width="50" Height="50" VerticalAlignment="Center"/>
            </StackPanel>
            <StackPanel Width="328" Height="Auto" HorizontalAlignment="Right">
                <Grid Height="41">
                    <TextBlock x:Name="lbltitulo" Text="Hola Mundo" Margin="0" Height="Auto" Width="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="Wrap" FontFamily="Tahoma" FontSize="13.333" Foreground="Black"/>
                </Grid>
                <Grid x:Name="pnlTexto" Height="49" Visibility="Visible">
                    <TextBox x:Name="txtDato" Style="{StaticResource Estilo1TextBox}" HorizontalAlignment="Center" VerticalAlignment="Center" Height="27" Width="313" MaxLines="1">
                        <TextBox.Effect>
                            <DropShadowEffect Direction="283" BlurRadius="10" ShadowDepth="1"/>
                        </TextBox.Effect>
                    </TextBox>
                </Grid>
                <Grid x:Name="pnlPassword" Height="49" Visibility="Hidden">
                    <PasswordBox x:Name="txtPassword" Style="{StaticResource Estilo1PasswordBox}" HorizontalAlignment="Center" VerticalAlignment="Center" Height="27" Width="313">
                        <PasswordBox.Effect>
                            <DropShadowEffect Direction="283" BlurRadius="10" ShadowDepth="1"/>
                        </PasswordBox.Effect>
                    </PasswordBox>
                </Grid>
                <Grid x:Name="pnlLista" Height="49" Visibility="Hidden">
                    <telerik:RadComboBox x:Name="cbxLista" IsSynchronizedWithCurrentItem="True" EmptyText="{x:Static lr:resxDialogoEntradaDatos.msjSeleccione}" IsEditable="False" HorizontalAlignment="Center" VerticalAlignment="Center" Height="27" Width="317">
                        <telerik:RadComboBox.Effect>
                            <DropShadowEffect Direction="283" BlurRadius="10" ShadowDepth="1"/>
                        </telerik:RadComboBox.Effect>
                    </telerik:RadComboBox>
                </Grid>
                <Grid x:Name="pnlNumero" Height="49" Visibility="Hidden">
                    <telerik:RadMaskedTextBox x:Name="fmtDato" Mask="n0" MaskType="Numeric" HorizontalContentAlignment="Right" Height="27" VerticalAlignment="Center" HorizontalAlignment="Center" Width="180">
                        <telerik:RadMaskedTextBox.Effect>
                            <DropShadowEffect Direction="283" BlurRadius="10" ShadowDepth="1"/>
                        </telerik:RadMaskedTextBox.Effect>
                    </telerik:RadMaskedTextBox>
                </Grid>
                <Grid x:Name="pnlFecha" Height="59" Visibility="Hidden">
                    <telerik:RadDateTimePicker x:Name="dtpFecha" InputMode="DatePicker" DisplayFormat="Short" DateTimeWatermarkContent="{x:Static lr:resxDialogoEntradaDatos.msjIngreseFecha}" Height="27" VerticalAlignment="Center" HorizontalAlignment="Center">
                        <telerik:RadDateTimePicker.Effect>
                            <DropShadowEffect Direction="283" BlurRadius="10" ShadowDepth="1"/>
                        </telerik:RadDateTimePicker.Effect>
                    </telerik:RadDateTimePicker>
                </Grid>
                <Grid Height="51">
                    <Button x:Name="btnAceptar" Content="{x:Static lr:resxDialogoEntradaDatos.btnAceptar}" BorderBrush="Black" Foreground="White" Height="29" VerticalAlignment="Center" HorizontalAlignment="Center" Width="99.696" Click="btnAceptar_Click">
                        <Button.Background>
                            <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                <GradientStop Color="#FFB9DEFF" Offset="0"/>
                                <GradientStop Color="#FF3B9CF5" Offset="0.5"/>
                                <GradientStop Color="#FF0077E5" Offset="0.539"/>
                                <GradientStop Color="#FF366FA5" Offset="1"/>
                            </LinearGradientBrush>
                        </Button.Background>
                    </Button>
                    <Path Data="M1,4 L379,5" Fill="#FF6289BC" Height="2" Margin="0,4,-1,0" Stretch="Fill" Stroke="Black" VerticalAlignment="Top"/>
                </Grid>
            </StackPanel>
        </StackPanel>
    </Grid>
</telerikNavigation:RadWindow>

My problem is when I try to show this window in my main program by clicking a button, code is like this: 

frmDialogoEntradaDatos frmDialogo = new frmDialogoEntradaDatos();
frmDialogo.Mensaje = resxUsuarios.titSolicitudPassword;
frmDialogo.TipoDialogo = frmDialogoEntradaDatos.Tipo.TEXTO_PASSWORD;
frmDialogo.OnClose += new CloseEventHandler(EstablecerContraseña);
frmDialogo.Show();

frmDialogo is never shown, not even using ShowDialog(). I try to test original RadWindow instance like this:

RadWindow frmDialogo = new RadWindow();
frmDialogo.Width = 300;
frmDialogo.Height = 180;
frmDialogo.ShowDialog();

but nothing happen, but when using RadWindow.Alert(new DialogParameters() ... ); Works fine!

Thanks for your help
ENTERPRISE INTERNATIONAL SAS
Top achievements
Rank 1
 answered on 17 Dec 2010
2 answers
93 views

I have a GridView that is grouped on a column named Status (which in this case is a GridViewComboBoxColumn even though I've seen the same behavior for GridViewCheckBoxColumn). When I change value of the Status and press Enter, the record is correctly moved to its new group, BUT the original group still holds a "ghost" record that cannot be modified. The only way to get rid of that record is to refresh the view manually by sorting or grouping.

Why does this happen? Must I refresh the view programmatically to avoid it?

Pelle
Top achievements
Rank 1
 answered on 17 Dec 2010
2 answers
372 views
I have an implementation of IPagedCollectionView that I'm using for custom paging of SQL data.  Things seem to be working almost perfectly, but I have one issue that I need help with.

When I change pages in the RadDataPager my IPagedCollectionView is called appropriately, MoveToNextPage() is called.  My code responds by retrieving the next page of data and changing the current page index value.  The problem is that the RadGridView does not update its display with the result being that the new page of data is not displayed in the control.  In debugging this I can see that the control is not calling GetEnumerator() after the page change.  My suspicion is that the grid control is assuming that the enumerator will not change, just the contents of the collection will change.  In my case I am changing the collection on each page change an expecting the grid control to perform a new enumeration by first calling GetEnumerator().

Comments?

*** Actually, changing the code to use the same collection for the enumeration does not improve things.  Another data point is that the data pager does not update its display to indicate that a page change has happened.  The data pager control always says that it is on page #1.
Wesley Witt
Top achievements
Rank 1
 answered on 17 Dec 2010
3 answers
110 views
Which key presses are passed through to the KeyDown event?  It seems that keys like page up/down are not passed through, just alpha keys, numbers, etc.

I need to get the other keys such as page up/down, arrow keys, etc. so that I can implement keyboard support for paging.

Thanks.
Wesley Witt
Top achievements
Rank 1
 answered on 17 Dec 2010
2 answers
248 views
public class Node
{
  public Node(string myText)
  {
     this.Text = myText;
     this.Nodes = new ObservableCollection<Node>();
  }
  
  public string Text { get; set; }
  
  public ObservableCollection<Node> Nodes { get; private set; }
}

ObservableCollection<Node> nodes = new ObservableCollection<Node>(); 
                  
nodes.Add(new Node("Company"));
nodes[0].Nodes.Add(new Node("Department"));
nodes[0].Nodes[0].Nodes.Add(new Node("here are you"));
  
radTreeView1.ItemsSource = nodes;

<Window.Resources>
    <DataTemplate x:Key="itemTemplate">
        <TextBlock x:Name="child" Text="{Binding Text}"/>
    </DataTemplate>
    <HierarchicalDataTemplate x:Key="masterTemplate" ItemsSource="{Binding Nodes}" ItemTemplate="{StaticResource itemTemplate}">
        <telerik:RadTreeViewItem Header="{Binding Text}"/>
    </HierarchicalDataTemplate>
</Window.Resources>
<Grid>
    <telerik:RadTreeView Name="radTreeView1" ItemTemplate="{StaticResource masterTemplate}"/>
</Grid>

Why "here are you" is not displayed? This is the idea of HierarchicalDataTemplate or not?

Kind regards,

Marinko
Marinko
Top achievements
Rank 1
 answered on 17 Dec 2010
6 answers
104 views
Hi there,

I have to step over all GridViewCells in a RadGridView (perhaps with a foreach) but I have no plan how I can do it.
Would be nice if someone can help me.

Thx
Andi
Andi
Top achievements
Rank 2
 answered on 17 Dec 2010
1 answer
85 views
Hello,

I just started using  Telerik's controls. After I set a DataTable as the source for the GridView, how do I tell it (in code) that, for instance, the column "image" is of type "GridViewImageColumn" and not string.

Thank you
Vanya Pavlova
Telerik team
 answered on 17 Dec 2010
3 answers
137 views
Hi

I want to know. How can I apply Sorting on a Column by default when grid load. If I want that on a column "Customer Name" than How will I do this.
Veselin Vasilev
Telerik team
 answered on 17 Dec 2010
1 answer
120 views
Hi,

I do I set the theme propery in code? 
I've tried something like : myGrid.Skin = "Vista" , but it tells me there is no "Skin" property in the RadGridView Object.

Thank you
Veselin Vasilev
Telerik team
 answered on 17 Dec 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?