tagged [datagrid]

How can I set the color of a selected row in DataGrid

How can I set the color of a selected row in DataGrid The default background color of a selected row in DataGrid is so dark that I can't read it. Is there anyway of overriding it? Tried this ```

4 Dec at 21:27

StackPanel vs DataGrid vs DockPanel in WPF

StackPanel vs DataGrid vs DockPanel in WPF I will need to dynamic generate a square matrix of "boxes"(e.g. 2x2, 3x3 etc.), each containing a textbox and a button. These boxes and text will also resize...

6 Dec at 14:26

Datagrid.IsSelected Binding and scrolling

Datagrid.IsSelected Binding and scrolling I uses MVVM and I bind datagrid to collection with some code: And I aslo use binding to IsSelectedProperty using style (RowStyle or ItemContainerStyle) ```

20 Mar at 14:57

Freeze DataGrid Row

Freeze DataGrid Row I was wondering if in a WPF datagrid in .net 4.0, is it possible to have a static row. What I am trying to achieve is to create a static row (row 0), that will always be displayed ...

6 Jan at 18:43

Align DataGrid Column Header to Center

Align DataGrid Column Header to Center I need to align `WPF DataGrid Column Header` text to . I created a style and attached that using the `HeaderStyle` property as below. ```

21 Feb at 03:16

How to extract DataGridCell from DataGridCellinfo class in wpf

How to extract DataGridCell from DataGridCellinfo class in wpf I want to know how to get the DataGridCell from DataGridCellInfo. Actually i have a some selected cells in datagrid, and SelectedCells pr...

8 Nov at 10:19

Difference between WPF DataGrid's EnableRowVirtualization and VirtualizingStackPanel.IsVirtualizing properties

Difference between WPF DataGrid's EnableRowVirtualization and VirtualizingStackPanel.IsVirtualizing properties There is almost no information out there about the impact of setting; and Can someone cla...

20 Jul at 14:14

How do I make XAML DataGridColumns fill the entire DataGrid?

How do I make XAML DataGridColumns fill the entire DataGrid? I am using DataGrids in XAML (not Silverlight) with resizable columns, the DataGrid will expand if the user resizes the screen. Currently i...

1 Sep at 03:46

WPF hide row in datagrid based on condition

WPF hide row in datagrid based on condition I need to hide rows in datagrid based on parameters and values in the datagrid. I figured to do something like this; I just cannot figure how to actual hide...

11 Oct at 14:22

Change DataGrid column header text

Change DataGrid column header text I have a list of a specific class type `Person` and I want to make a `DataGrid` with it. And the `Person` class: After all this I get a ta

12 Feb at 12:45

Why sorting using CollectionViewSource.SortDescriptions is slow?

Why sorting using CollectionViewSource.SortDescriptions is slow? This is the default sort method when you click on a column header in a `DataGrid`. When the underlying list contains 100,000 items, it ...

24 Aug at 20:38

Disable selecting in WPF DataGrid

Disable selecting in WPF DataGrid How can I disable selecting in a WPFTooklit's `DataGrid`? I tried modifying the solution that works for `ListView` (from [WPF ListView turn off selection](https://sta...

23 May at 11:47

WPF DataGrid: How to Determine the Current Row Index?

WPF DataGrid: How to Determine the Current Row Index? I am trying to implement a very simple spreadsheet functionality based on a DataGrid. 1. The user clicks on a cell 2. The user types a value and p...

15 Nov at 14:14

How can I set the binding of a DataGridTextColumn in code?

How can I set the binding of a DataGridTextColumn in code? I'm using the toolkit:DataGrid from CodePlex. I'm generating the columns in code. How can I set the equivalent of in code? Or alternatively, ...

27 May at 15:42

How to set focus on a particular row in a datagrid/gridview?

How to set focus on a particular row in a datagrid/gridview? I have a datagrid/gridview. I'm populating the grid with 10 rows initially. On a button click every time,I'm keeping on adding 10 rows to t...

26 Dec at 13:1

How to bind DataTable to Datagrid

How to bind DataTable to Datagrid I have a problem binding a `DataTable` to a `DataGrid`. I have already searched for solutions but just can't get rid of the error. `DataTable` I just can't bind it to...

8 Dec at 06:30

WPF DataGrid - Event for New Rows?

WPF DataGrid - Event for New Rows? I'm using the WPF `DataGrid` ( version from the [Toolkit](http://wpf.codeplex.com/releases/view/40535)) What event can I subscribe to, to detect when a new row is ad...

18 Jul at 21:16

Convert ICollectionView to List<T>

Convert ICollectionView to List I am binding property type of ICollectionView on DataGrid controls in WPF, .NET 4.0. I use `Filter` on `ICollectionView`. ``` public ICollectionView CallsView { g...

28 Jul at 14:37

Date formatting in WPF datagrid

Date formatting in WPF datagrid I want to change is the date column from a format "DD/MM/YYYY HH:MM:SS" to "DD.MM.YYYY". ```

21 Sep at 02:34

Add custom tooltip to row in DataGrid

Add custom tooltip to row in DataGrid I would like to customize my DataGrid to show a tooltip within the selected row, please see the mockup images below for a better idea of what I want to achieve. -...

21 Nov at 15:8

Removing all DataGrid row and cell borders

Removing all DataGrid row and cell borders I want to hide (or remove) all the borders of all the rows (and subsequently cells) in my datagrid, think a basic [HTML table](http://jsfiddle.net/QSqMt/). I...

6 Dec at 13:34

WPF Datagrid - deselect selected item(s) when clicking whitespace in the DataGrid

WPF Datagrid - deselect selected item(s) when clicking whitespace in the DataGrid The default behavior is to use CTRL+Click to deselect items in the Datagrid I want to be able to mouse click (left or ...

21 May at 03:15

Improve WPF DataGrid performance

Improve WPF DataGrid performance In my `.NET 3.5` `WPF` Application, I have a `WPF` `DataGrid` which will be populated with 500 columns and 50 rows. The performance of App is very very poor in scrolli...

7 Dec at 14:0

Binding datagrid column width

Binding datagrid column width I have two datagrids with one column each. First: Second: ```

1 Feb at 17:42

Is there a DataGrid "rendering complete" event?

Is there a DataGrid "rendering complete" event? When I load my DataGrid, I change the cursor to the wait-icon, load data into my ItemsSource from a database, and then set the cursor back to default. T...

30 May at 21:58