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

I am using RowActivated for my RadGridView and have a few issues:

- The RowActivated event is triggered on a mouse double click but NOT when Enter is pressed. According to the documentation and a lot of posts (with provided examples) it should. Since a lot a users get the event triggered successfully by Enter key down, I probably have some properties set that prevents this. If so, which properties would block the event (please see my XAML below).

- With the RowActivated event, I'd like to send a command argument that contains the string displayed in the first column. How do I achieve that (in XAML and in C# code)?

This is my XAML:

                <Telerik:RadGridView
                    RowActivated="HandleEvent_GridRowDoubleClick"
                    Telerik:StyleManager.Theme="Office_Blue"
                    RowIndicatorVisibility="Collapsed"
                    SelectionMode="Single"
                    Width="Auto"
                    CanUserFreezeColumns="False"
                    CanUserSortColumns="True"
                    HorizontalAlignment="Left"
                    HorizontalContentAlignment="Left"
                    ItemsSource="{Binding DataTableUnitLoads.DefaultView, Mode=OneWay}"
                    VerticalAlignment="Stretch"
                    AutoGenerateColumns="False"
                    ShowGroupPanel="False"
                    EnableColumnVirtualization="True"
                    ShowColumnFooters="True"
                    hlp:RadGridViewCustomKeyboardCommandProvider.PreventEnter="True"
                    ScrollViewer.HorizontalScrollBarVisibility="Auto"
                    EnableRowVirtualization="True"
                    CanUserReorderColumns="False">

And this is my C#:

        private void HandleEvent_GridRowDoubleClick(object sender, RowEventArgs e)
        {
        }

Thanks in advance for your help!
Dimitrina
Telerik team
 answered on 10 Feb 2014
4 answers
196 views

    Hi ,

        Could any one please help me in showing the stroke in the middle of the line series as shown in the image.

Thanks,
Ruth
Pavel R. Pavlov
Telerik team
 answered on 10 Feb 2014
2 answers
154 views
Is there a way to have a RadRibbonGallery automatically resize its width based on the content available when the window is resized? I currently have the ViewportWidth set to display three of the items it contains, but if there is more window space available I would like for it to display as many as possible and fill up the remaining whitespace in the ribbon. I have seen this functionality in MS Word with the Styles gallery.
Melissa
Top achievements
Rank 2
 answered on 10 Feb 2014
1 answer
113 views
Hi,

i bind a DataTable to my RadGridView like this:

​DataTable source = new DataTable();
source.Columns.Add("Nr.", typeof(int));
source.Columns.Add("Modul", typeof(string));
source.Columns.Add("ID", typeof(string));
source.Columns.Add("Nummer", typeof(string));
source.Columns.Add("Suchwort", typeof(string));
source.Columns.Add("Inhalt", typeof(string));
source.Columns.Add("Feld", typeof(string));


How do i set the width of each column in code behind?

Thanks a lot
Best Regards
MJ
Dimitrina
Telerik team
 answered on 10 Feb 2014
1 answer
98 views
This is big and unacceptable.  Please fix this now, I'm on 2013.3.1316.40.
What did you do to the input box on the last update.  This is the 2nd error I've found now. 

I have some sample code that will show you.

<Window xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"  x:Class="RadTextChanged.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <StackPanel>
        <StackPanel Orientation="Horizontal">
            <TextBlock Name="txt123" />
            <telerik:RadMaskedTextInput  Margin="10 0 0 0"  ValueChanged="tbChange_ValueChanged"  Name="tbChange" Width="200" Height="30" />
            <Button Content="Change Rad TextInput" Margin="10 0 0 0"  Click="Button_Click"  Width="200" Height="30"  />
            
        </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock Name="txtPlain" />
                <TextBox  Margin="10 0 0 0"  TextChanged="tbPlain_TextChanged" Name="tbPlain" Width="200" Height="30" />
                <Button Content="Change Textbox" Name="btnPlain" Margin="10 0 0 0"  Click="btnPlain_Click"  Width="200" Height="30"  />
 
            </StackPanel>
        </StackPanel>
    </Grid>
</Window>

code behind
namespace RadTextChanged
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }
 
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            tbChange.Value = "test123";
 
        }
 
        private void tbChange_ValueChanged(object sender, Telerik.Windows.RadRoutedEventArgs e)
        {
            txt123.Text = "Hello";
        }
 
        private void tbPlain_TextChanged(object sender, TextChangedEventArgs e)
        {
            txtPlain.Text = "Hello Plain";
        }
 
        private void btnPlain_Click(object sender, RoutedEventArgs e)
        {
            tbPlain.Text = "TestPlain";
        }
    }
}
Milena
Telerik team
 answered on 10 Feb 2014
1 answer
63 views
Hi All,

I took the dlls of Q3 2013 telerik dlls for WPF 4.0,but when building the aplication,it is showing that we need 4.5 framework.Could you please guide in this issue?Are there any dlls used with 4.5 framework in 4.0?


Thanks,
Ruth
Yana
Telerik team
 answered on 10 Feb 2014
3 answers
106 views
Have you stopped developing your UI tools?

There seems to be no internal builds since 2013 Q3.
Yana
Telerik team
 answered on 10 Feb 2014
10 answers
838 views
Hi,

I'm trying to display a standard context menu on a RadGridView that lists the columns that are contained within the grid.  The purpose of this is so that I can have a checkbox on the menu item that controls/changes the visibility of the column on the grid.  I've seen the article (http://www.telerik.com/help/wpf/radgridview-how-to-show-hide-columns-outside-of-the-radgridview.html) that shows how to dynamically populate a listbox with checkboxes using XAML and bindings - this is close to what I want.

I've tried to add the context menu directly to the RadGridView using the following XAML but had no luck so far:

<telerik:RadGridView HorizontalAlignment="Left" Margin="15" Name="radGridView1" VerticalAlignment="Top" AutoGenerateColumns="False"
                                 ItemsSource="{Binding ElementName=TheContext, Path=TestModels}">
                <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn Header="AA" DataMemberBinding="{Binding Path=AA}" />
                    <telerik:GridViewDataColumn Header="BB" DataMemberBinding="{Binding Path=BB}" />
                </telerik:RadGridView.Columns>
                <telerik:RadGridView.ContextMenu>
                    <ContextMenu>
                        <MenuItem Header="Columns" ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=telerik:RadGridView, AncestorLevel=1}, Path=Columns, Mode=TwoWay}">
                            <MenuItem.ItemTemplate>
                                <HierarchicalDataTemplate>
                                    <MenuItem Header="Binding Header, Mode=TwoWay}" IsCheckable="True" IsChecked="{Binding IsVisible, Mode=TwoWay}"/>
                                </HierarchicalDataTemplate>
                            </MenuItem.ItemTemplate>
                        </MenuItem>
                    </ContextMenu>
                </telerik:RadGridView.ContextMenu>
            </telerik:RadGridView>

In the Output window I can see I get the following error message: System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Telerik.Windows.Controls.RadGridView', AncestorLevel='1''. BindingExpression:Path=Columns; DataItem=null; target element is 'MenuItem' (Name=''); target property is 'ItemsSource' (type 'IEnumerable')

I thought perhaps I should try creating a context menu on something other than the RadGridView I've tried adding a context menu to a label that's outside of the RadGridView just to test things out but so far have called no joy.  The XAML I was using for this was:

<Label>
                <Label.Content>I'm a label but right click me...</Label.Content>
                <Label.ContextMenu>
                    <ContextMenu Name="MainCollection">
                        <MenuItem Header="Columns">
                            <MenuItem ItemsSource="{Binding ElementName=radGridView1, Path=Columns, Mode=TwoWay}">
                                <MenuItem.ItemTemplate>
                                    <HierarchicalDataTemplate>
                                        <MenuItem Header="Binding Header, Mode=TwoWay}" IsCheckable="True" IsChecked="{Binding IsVisible, Mode=TwoWay}"/>
                                    </HierarchicalDataTemplate>
                                </MenuItem.ItemTemplate>
                            </MenuItem>
                        </MenuItem>
                    </ContextMenu>
                </Label.ContextMenu>
            </Label>

From the output window I get the following error message "System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=radGridView1'. BindingExpression:Path=Columns; DataItem=null; target element is 'MenuItem' (Name=''); target property is 'ItemsSource' (type 'IEnumerable')"

Any ideas welcome,
Chris.
Ivan
Top achievements
Rank 1
 answered on 10 Feb 2014
3 answers
156 views
Hello
i am adding some comumns in my code behind to a radgridview
The problem i get is that these columns are not filterable neither groupable . I have some columns defnied in the xaml and these are filterable and groupable.

So i dont understand why the dinamicly created columns are not.

Here is my code

<telerik:RadGridView Name="GridViewListeConstituants" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Style="{DynamicResource RadGridViewStyle1}" HeaderRowStyle="{DynamicResource GridViewHeaderRowStyle1}"
                             Margin="5" ItemsSource="{Binding listeConstituants}" AutoGenerateColumns="False" >
            <telerik:RadGridView.RowStyleSelector>
                <telerik:ConditionalStyleSelector>
                    <telerik:StyleRule Condition="enCreation" Style="{DynamicResource RowEnCreationStyle}" >
                    </telerik:StyleRule>
                    <telerik:StyleRule Condition="enCreation=false" Style="{DynamicResource RowStandardStyle}">
                    </telerik:StyleRule>
                </telerik:ConditionalStyleSelector>
            </telerik:RadGridView.RowStyleSelector>
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding LIBELLE}" Header="LibellĂ©" HeaderCellStyle="{DynamicResource HeaderCellStyle1}">
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding UNITE}" Header="UnitĂ©" HeaderCellStyle="{DynamicResource HeaderCellStyle1}">
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding VALEURDEFAUT}" Header="Valeur par dĂ©faut" HeaderCellStyle="{DynamicResource HeaderCellStyle1}">
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn Header="PropriĂ©tĂ©s" HeaderCellStyle="{DynamicResource HeaderCellStyle1}" >
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <telerik:RadButton Name="ButtonProprietes" Content="{Binding StringPropriete}" Click="ButtonProprietes_Click_1"></telerik:RadButton>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>


foreach (CONTEXTE monContexte in listeContextes)
            {
                Telerik.Windows.Controls.GridViewCheckBoxColumn maColonne = new Telerik.Windows.Controls.GridViewCheckBoxColumn();
                //Telerik.Windows.Controls.GridViewDataColumn maColonne = new Telerik.Windows.Controls.GridViewDataColumn();
                maColonne.HeaderCellStyle = this.FindResource("HeaderCellStyle1") as Style;
                maColonne.DataMemberBinding = new Binding("RowContextes[" + monContexte.LIBELLE + "]");
                maColonne.Name = "C"+ monContexte.ID_CONTEXTE.ToString();
                maColonne.Header = monContexte.LIBELLE;
                maColonne.Width =100;
                maColonne.TextAlignment = TextAlignment.Center;
                maColonne.CellStyle = this.FindResource("CheckBoxCellStyle") as Style;
                this.GridViewListeConstituants.Columns.Add(maColonne);
                maColonne.IsCustomSortingEnabled = true;
                maColonne.IsFilterable = true;
                maColonne.IsGroupable = true;
                maColonne.IsReorderable = true;
                maColonne.IsSortable = true;
                maColonne.IsThreeState = true;
                maColonne.DataType= System.Type.GetType("Boolean");
                //maColonne.
                 
            }


Any idea about what this isnt working?
Alexandre
Top achievements
Rank 1
 answered on 10 Feb 2014
0 answers
139 views
Hi,

is it possible to create a "facets-search view" in a Tree ListView? If i Change the entry in the treeListView i want to update my GridView!

Thanks
best regards
rene
ITA
Top achievements
Rank 1
 asked on 10 Feb 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
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
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
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?