When I correct errors the red box around the cell disappears but the "!" mark indicating row validation errors doesn't go away.
This only seems to occur with a DataGridComboBoxColumn, text columns work correctly.
What could be causing this?
...
How do I use cell and row validation with DataGridTemplateColumn?
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataType}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
...
When I start editing my grid IEditableObject.BeginEdit. And if I leave then IEditableObject.EndEdit is called. However, if I press Escape then IEditableObject.CancelEdit doesn't get called.
This was working before, so I'm not sure what I did to break it. Or even what can break it.
...
I am making a WPF Application where in i have a datagrid inside a treeview. Now....When i right-click on an item in this grid, i get a context menu with a Rename option. On this, I need to write a Rename logic. I want to do just like we rename folders in windows. How can i go about it? Please give me a simple solution as I am not a pro l...
I recently discovered that some functionality has been changed drastically in the DataGrid since it made it into the general 4.0 framework (Using BindingGroups for one).
Can anyone point me at a list of changes (breaking or non-breaking)?
...
I have to access the value that underlies the active cell of a DataGrid (The cell with the black border around it).
Luckily DataGrid has a lot of properties such as CurrentCell, CurrentItem SelectedCells SelectedItem and SelectedItems seeming to provide me with the data I want.
However I have not figured out how to access the cell in ...
How can set "AllowUserToResizeRows" property in Header listview wpf?
it was in Windows.Forms thus :" dataGridView.AllowUserToResizeRows = false "
My xaml code is :
<ListView Margin="2.5,0,0,32" Name="listView1" ItemContainerStyle="{StaticResource myItemStyle}" SelectionMode="Single" HorizontalContentAlignment="Center" VerticalAlignmen...
Is there a way to determine whether a WPF DataGrid is in edit mode / which row is currently edited?
EDIT
Duplicate: http://stackoverflow.com/questions/3248023/code-to-check-if-a-cell-of-a-datagrid-is-currently-edited
...
After a few hours trying to reach some working sample i decided to try my luck here. I am a newbie to WPF, but things should get easier with time ...
I am trying to have a DataGrid showing an XML file i have. That's it.
I have in my application cars.xml
<cars>
<car type="Ford" size="4" />
<car type="Mercedes" size="2" />
...
Any hands on example for implmenting the Traversing of the DataGrid/Listview colum element if the column has a DataTemplate applied with TextBox?.
...
Here's my current problem:
I have a data grid with 4 columns in it: Year One by Index, Year One by Percentage, Year Two+ by Index, and Year Two+ by Percentage. I want my data grid to make these columns mutually exclusive with its counterpart column.
So for example, if I type in a number for Year One by Percentage I shouldn't be allowed...
This is what I want:
There is a combo-box column bound to the ApplicationKey property of ClassA
The combo-box is populated with ApplicationTokens from a static function all.
An ApplicationToken has a ApplicationName and ApplicationKey property
When an item is selected in the drop-down, the ClassA.ApplicationKey property is set to the A...
This is what I want:
There is a combo-box column bound to the ApplicationKey property of ClassA.
ClassA.ApplicationKey is a Nullable<Int32>
The combo-box is populated with ApplicationTokens from a static function all.
An ApplicationToken has a ApplicationName and ApplicationKey property
When an item is selected in the drop-down, the Cl...
In this sample I have two buttons. The button in the header works, but the one in the grid gives me the error show below.
<GroupBox DockPanel.Dock="Top" >
<GroupBox.Header>
<StackPanel Orientation="Horizontal">
<Label Content="Recent Servers" />
<CheckBox Content="Auto-Refresh" />
<Button ...
HI,
I have a datagrid (from wpf toolkit) which is binded to an observable collection . There are two buttons "Up" and "Down" which moves the selected row accordingly.
For eg: If there are 10 items in the datagrid and if I select the 4th item and press "Up" arrow ,then the 4th item will be moved to 3rd item and previous 3rd item will b...
Can anyone point me to a very simple example(C#4.0) of a WPF Datagrid thats bound to a SQL table. I'd really like the simplist example possible. I want to be able to add, edit and delete rows. Thanks.
...
Making a separate question, related to comments on the answer to http://stackoverflow.com/questions/2481946/wpf-4-what-happened-to-datagridcolumnheader
It appears I can use DataGridHeaderBorder in a UserControl, stand-alone in a ResourceDictionary, but not in a Style's setter of a Template.
<ResourceDictionary xmlns="http://schemas.mic...
I am using a datagrid with a combox that should change the grouping field. I am using the following xaml to define the general grouping template :
<DataGrid.GroupStyle>
<GroupStyle>
<GroupStyle.ContainerStyle>
<Style TargetType="{x:Type GroupItem}">
<Setter Property="Template">
...
I'm using a DataGrid to display the values of specific properties of a collection of objects. I've implemented search and cell highlighting through a similar method to the one on Tomer Shamam's blog.
However, I now need to implement 'Find/Replace' type functionality. I presumed I would be able to iterate through the DataGrid's cells to ...
I am using WPF toolkit provided DataGrid control to display product list along with its OpenStock, Description etc. In this DataGrid i have set OpenStock column to editable and rest are non-editable. What i want now when my this windows loads, I want to set keyboard focus to first cell of OpenStock column and if possible in edit mode. I ...