Telerik Forums
UI for WPF Forum
3 answers
322 views
I have a RadGridView that's bound to the DataView of a DataTable.  Whenever the underlying database table contains a boolean column, RadGridView appropriately (and automatically) renders that column using a GridViewCheckBoxColumn.  However, by default, it takes 3 mouse clicks to modify the value of any given checkbox.  I've read the help topics on reducing the click count to either 2 clicks or 1 click.

I'd like to start by setting the EditTriggers property for every GridViewCheckBoxColumn to "CellClick" - which according to the docs should reduce my click count to 2.  However, I'm not sure of the appropriate place to make that adjustment.  I assumed that from within the AutoGeneratingColumn event handler, I could detect the current column was a GridViewCheckBoxColumn and simply set the property there.

However, examining the arguments passed into that method (the RadGridView itself and a GridViewAutoGeneratingColumnEventArgs object), I didn't see anything which indicated the current column was a GridViewCheckBoxColumn.

I know I can *create* my own, new GridViewCheckBoxColumn from within that event handler, but is that really necessary since it already exists?  Also, in order to create my own column, I'd need to know that the current db column is indeed a Boolean (by *type*, not by field name) - which I haven't found a way to determine from within the event handler either.

I also tried to add the following Style to the view's XAML, but it didn't seem to have any effect:

<UserControl.Resources>
    <ResourceDictionary>
        <Style TargetType="telerik:GridViewCheckBoxColumn">
            <Setter Property="EditTriggers" Value="CellClick" />
        </Style>
    </ResourceDictionary>
</UserControl.Resources>

Note that I am using implicit styles that can be changed at runtime - in case that impacts the validity of the above style setting...

So, what's the best way to set the EditTriggers property on an AutoGenerated column?

Thanks,

Jeff
Jeff
Top achievements
Rank 1
 answered on 11 Feb 2014
3 answers
1.0K+ views
Hi, 

I'm trying to place two grids in a window that looks like the below.

----------------------------------------------------------------
|                                                                              |
----------------------------------------------------------------
|                              |           |                                    |
|        GridView      |           |        GridView            |
|          Here            |           |          Here                 |
|                              |           |                                    |
|                              |           |                                    |
|                              |           |                                    |
|                              |           |                                    |
|----------------------------------------------------------------
|                                                                              |
----------------------------------------------------------------

Now the grids should resize with the window. This led me create a Grid with the following row and column definitions.
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

This works great when there aren't very many items in the gridviews but the gridview in the left will almost always have over 1500 items in it. I did read your documentation where it states that placing gridviews in a spot where it measures infinity it will perform slowly. How would you recommend I layout the view so that the grid resizes with the window and still allows for a large amount of items?
Carlos
Top achievements
Rank 1
 answered on 10 Feb 2014
1 answer
125 views
What effect, if anything, does putting a slash in from of the field bound to the control, have? For example:

​
<telerik:RadMaskedNumericInput
    Grid.Column="1"
    HorizontalAlignment="Left"
    Grid.Row="2"
    Margin="5,0,0,0"
    VerticalAlignment="Bottom"
    Mask="####"
    FontFamily="Century Gothic"
    FontSize="16"
    Value="{Binding /ProbationStartYear}"
    IsClearButtonVisible="False"
    AutoFillNumberGroupSeparators="False" />
Boris
Telerik team
 answered on 10 Feb 2014
1 answer
257 views
 I updated my WPF controls and now my border is blank when I set my border thickness to 0.5, the border is blank, or doesn't show.

  myMaskedTextBox.BorderThickness =  new Thickness(0.5);

if do: 
  myMaskedTextBox.BorderThickness =  new Thickness(1);  it's ok, but thicker than I want.

Sia
Telerik team
 answered on 10 Feb 2014
11 answers
923 views
Hello,

How can I hide filtering options?  I do not want to display the 'And / Or' dropdown as well as the 'Is equal to' dropdown and the textbox that goes along with it.  I tried using the DistinctFiltersVisibility property, but it did not hide those options.  Is that not what it is supposed to do?  Do I need to override the template and do custom filtering to hide these options?
Yoan
Telerik team
 answered on 10 Feb 2014
1 answer
603 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
207 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
165 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
121 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
104 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
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
DataPager
PersistenceFramework
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?