wpftoolkit

How to set up the datagrid control from the Xceed\Extended WPF Toolkit with checkbox column and binding

流过昼夜 提交于 2019-11-30 18:29:03
问题 I'm trying to swap out a WPF datagrid to a xceed\Extended WPF Toolkit DataGridControl. I need to react to the click event in a checkbox column ... to summarizing a number of other columns. In the existing datagrid I have a checkbox column, that is bound to a Observable Collection and I call a method if any check box is checked\unchecked. The xaml I use for this, which works, is as such: <DataGridTemplateColumn Width="40" Header="Inc"> <DataGridTemplateColumn.CellTemplate> <DataTemplate>

How to show row index for wpf toolkit datagrid?

女生的网名这么多〃 提交于 2019-11-30 18:04:17
问题 I just want to add a index column in wpf toolkit DataGrid to show row index of each data in the DataGrid . How? <dg:DataGrid ItemsSource="{Binding List}" SelectionMode="Extended" IsReadOnly="True" AutoGenerateColumns="False" HorizontalAlignment="Left"> <dg:DataGrid.Columns> **<dg:DataGridTextColumn Header="Row Index"></dg:DataGridTextColumn>** <dg:DataGridTextColumn Header="Branch" Binding="{Binding Branch.Id}"></dg:DataGridTextColumn> <dg:DataGridTextColumn Header="Count" Binding="{Binding

How do I enable text wrapping on all column headers?

杀马特。学长 韩版系。学妹 提交于 2019-11-30 16:50:06
I would like to enable text wrapping on all column headers of my DataGrid, without disabling the other default header functionality, such as column resizing, sort direction indicator, etc. Is there a way to do this? Nate Or don't bother with the primitives in the app.xaml file and do the following (my objects): <DataGrid Name="WBdataGrid" AutoGenerateColumns="False" ColumnHeaderHeight="50" > <DataGrid.ColumnHeaderStyle> <Style TargetType="DataGridColumnHeader"> <Setter Property="ContentTemplate"> <Setter.Value> <DataTemplate> <TextBlock TextWrapping="Wrap" Text="{Binding}"></TextBlock> <

PowerShell WPF DataGrid: Exception thrown committing empty row

孤者浪人 提交于 2019-11-30 15:50:26
问题 I get exception trying to commit empty DataGrid row. System.NullReferenceException: Object reference not set to an instance of an object. at MS.Internal.Data.PropertyPathWorker.DetermineWhetherDBNullIsValid() at MS.Internal.Data.PropertyPathWorker.get_IsDBNullValidForUpdate() at MS.Internal.Data.ClrBindingWorker.get_IsDBNullValidForUpdate() at System.Windows.Data.BindingExpression.ConvertProposedValue(Object value) at System.Windows.Data.BindingExpressionBase.UpdateValue() at System.Windows

DatePicker.SelectedDate not changing when Text is input

喜欢而已 提交于 2019-11-30 11:36:34
When my users select a date via the Calander control within the DatePicker, the value gets correctly bound to the underlying object. BUT, if the user types the date within the DatePicker, then clicks a button, the text is not set to the SelectedDate property. The user has to remove the cursor from the TextBox within the DatePicker for the bound object to be updated. <toolkit:DatePicker Name="_dpField" Grid.Column="1" MinWidth="100" ToolTip="{Binding Path=ToolTipText}" TextInput="_dpField_TextInput" SelectedDate="{Binding Path=Value, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/> HELP!

WPF Toolkit Datagrid - how do you turn selection off?

感情迁移 提交于 2019-11-30 08:48:17
I have a datagrid in WPF that I am binding to an object. I have a DataGridCheckBoxColumn on there which I want the users to be able to go through and tick the ones they want. Problem is they have to click twice, once for selection then again to check/uncheck. How on earth do you turn this off, I've been searching for way to long to find the answer to this. The datagrid has SelectionMode and SelectionUnit properties - neither of which accept 'none' or 'go away' Any help is appreciated! My code is below for reference <my:DataGrid Margin="15" Name="dgPreview" AutoGenerateColumns="False"

Text alignment in a WPF DataGrid

让人想犯罪 __ 提交于 2019-11-30 07:48:33
How can I align the column data to center in a WPF DataGrid ? Kent Boogaart It's hard to say without knowing specifics, but here's a DataGridTextColumn that is centered: <wpf:DataGridTextColumn Header="Name" Binding="{Binding Name}" IsReadOnly="True"> <wpf:DataGridTextColumn.CellStyle> <Style> <Setter Property="FrameworkElement.HorizontalAlignment" Value="Center"/> </Style> </wpf:DataGridTextColumn.CellStyle> </wpf:DataGridTextColumn> If you are using DataGridTextColumn you can use the following code snippet: <Style TargetType="DataGridCell"> <Style.Setters> <Setter Property="TextBlock

Is there a way to associate a Command with a WPF Toolkit DataGridHyperlinkColumn?

被刻印的时光 ゝ 提交于 2019-11-30 05:10:13
问题 Is there any way I can associate a Command with a DataGridHyperlinkColumn? I've tried this: <DataGridHyperlinkColumn Header="Client Name" Binding="{Binding ShortName}"> <DataGridHyperlinkColumn.ElementStyle> <Style TargetType="TextBlock"> <Setter Property="Hyperlink.Command" Value="{Binding DataContext.NavigateToClientCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:ClientsSummaryView}}}"/> <Setter Property="Hyperlink.CommandParameter" Value="{Binding}"/> <

WPF Datagrid Multiple Selection without CTRL or Space

 ̄綄美尐妖づ 提交于 2019-11-30 03:32:33
问题 The WPF Datagrid has two selection modes, Single or Extended. The WPF ListView has a third - Multiple. This mode allows you to click and select multiple rows without CTRL or Shift being held down. Anyone know how to do this for the datagrid? 回答1: This is not supported in the DataGrid in the toolkit, and it looks like it won't be supported when the DataGrid is shipped with .NET 4 either. Yet another reason why this control is not ready for production use. I would go with one of these options:

Unknown Build Error using WPF Toolkit

倾然丶 夕夏残阳落幕 提交于 2019-11-30 00:45:12
问题 I installed the Feb 2010 WPF Toolkit as I'm interested in evaluating the AutoCompleteBox control and I'm having extremely limited success. I can get the control to work, but as soon as I try and set any of it's properties in XAML, I get the following: Unknown build error, 'Cannot resolve dependency to assembly 'WPFToolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be