wpfdatagrid

Filtering capabilities of WPF datagrid

In a WPF application I need to implement convenient for user possibility of quick and easy search for particular records from a SQL Server database. Please, could you share your expierience and opinion about filtering capabilities of WPF datagrid from a WPF Toolkit, comparing to third-party datagrids? ...

WPF Toolkit DataGrid SelectionChanged Getting Cell Value

Hi, Please help me, Im trying to get the value of Cell[0] from the selected row in a SelectionChangedEvent. I am only managing to get lots of different Microsoft.Windows.Controls and am hoping im missing something daft. Hoping I can get some help from here... private void datagrid_SelectionChanged(object sender, SelectionChangedE...

Move focus to first column of new row in DataGrid (WPF)

Hello All, I am binding a data table to a Datagrid (WPF toolkit) for add, edit and delete. I am able to use tab keys to navigate through the cells from top to bottom. But as soon as I press tab on last rows' last column, it is not taking the cursor to the first cell of new row. How can I achieve this? Thanks ...

how to extend WPF GridRow Contents into next row without expanding the current row.

Hello, I'm new to WPF and I'm trying to build a dropdown menu using the expander. Page layout is being handled with a Grid. The extender sits inside the first row of the grid and I would I would like the contents of the expander to expand over top of the contents of everything below when it's clicked. Unfortunately, right now, the ...

How to Refresh ReadOnly property bound to a DataGrid

Hi All, A have an Order class with a ReadOnly TotalPrice property that calcutaltes from other properties of the class. Throught an ObservableCollection I make a binding to a DataGrid. The code is below. Order Class public class Order { public String Name { get; set; } public Double Price { get; set; } public Int32 Quantity...

WPF Datagrid binding custom column headers.

I am trying to figure out how to bind a WPF DataGrid's column header and main data to a data source using an MVVM pattern. The result I'm looking for would look like this: I've successfully styled the headers here, but I'm unsure how to bind the values in the headers. Specifically, the IsChecked property of the check-box, the selected...

How to bind xml to the WPF DataGrid correctly?

I have looked for and tried various solutions but so far none of them solve my problem. I am using the built-in DataGrid from WPF in Visual Studio 2010/.NET4 to display data from an XML document stored as an XDocument. My code all runs fine, and I have verified that the XDocument is present and correct. The DataGrid does not display any...

Binding WPF Toolkit DataGrid ComboBox column to Linq-to-Sql collection after Window loads and connection changes?

Hi All, I am a beginner to MVVM. The main window uses a stock DataGrid from the WPF Toolkit. It has one View Model and relies only on DataContext_Changed event handler in the .xaml.cs file. The main window's DataContext is the View Model. I am attempting to bind the ItemsSource property of a DataGridComboBoxColumn to a CLR property, "...

Binding to DataGridComboBoxColumn from collection

Trying to bind to a collection in WPF, I got the following to work: XAML: <toolkit:DataGrid Name="dgPeoples"/> CS: namespace DataGrid { /// <summary> /// Interaction logic for Window1.xaml /// </summary> public partial class Window1 { private readonly ObservableCollection<Person> personList = new Observab...

WPF Datagrid virtualization and auto height (not explicit).

I am trying to design a view with a datagrid a grid splitter and a bottom panel that contains some messages. Something like: <Grid> <Grid.RowDefinitions> <RowDefinition Height="*"/> <RowDefinition Height="10"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <toolkit:DataGrid Grid.Row="0" {deta...

Datagrid (editable issue, access issue) in WPF

I created a Datagrid, as shown in this figure --> http://img682.imageshack.us/img682/5109/datagrid.png where user is supposed to enter data. In one of columns, I added Combobox.Now, the Datagrid won't allow me to enter data in the cells. IsReadOnly="False" was also not working, it was giving some "EditMode exception". So, what I did wa...

How to destroy RowDetails control when visibility collapsed

I'm trying to figure out how to get the grid to completely destroy my RowDetails control when I collapse its' visibility. I use a cloned copy of the item in that control so I don't truly save it until my service completes. Since the grid is re-using that control it's using the cloned version of the item which is causing incorrect behavio...

How to remove a row from datagrid

Hi All, I populate a DataGrid from a CollectionViewSource. Each row has a delete button. On delete i'm deleting a row from the DB. My problem is that the DataGrids' UI doesn't update. How do i clear the deleted row from the DataGrid? Any suggestions, please? ...

Resize Datagrid Height after deselecting a RowDetailsTemplate

I am using RowDetailsTemplate to display a nested datagrid for a row. Now the datagrid expands in height when I select a row to show this nested datagrid. But it doesn't reduce its height when the row is deselected. Is there a way to resize the datagrid to its original height after the row details have been collapsed? Is it possible to...

highlight the rowHeader and ColumnHeader for a selected cell wpf DataGrid

Hi. I am in the process of creating a excel like theme using the WPF Toolkit DataGrid, Im at a dead end and was wondering if someone has dealt with this problem: In my grid i need to highlight the rowHeader and ColumnHeader for a selected cell but can’t seem to get how. I am looking for this functionality: http://i738.photobucket.com/a...

ObservableCollection DataGrid

I bound the ObservableCollection to the dataGrid itemssource. the collectionChangedEvent of the observable Collection is getting called only when we add, delete, remove. But not firing when we update the record. how to fire the event for Update too? ...

Determine who has focus in WPF Window

Hi, We are using WPF and have a window derived from a DockingLibrary. This window has a grid with multiple items in it, one being a WPF datagrid. We are using the M-V-VM pattern. When this windown is created and shown, none of the rows in this datagrid are selected. We can set the row to display as highlighted by doing something like: ...

WPF Datagrid deselects row when control is disabled

I have a program in which a user selects a row in a Datagrid and then clicks a "Start Recording" button. While "recording" is happening, they are not allowed to change the value selected in the datagrid, so I set IsEnabled to false. However, when the datagrid is set to be disabled, it deselects the selected row, which screws up any bindi...

DataGridComboBoxColumn help needed (WPF DataGrid)

I've tried reading a lot of tutorials, but none have helped. Here is what I want to do. First.... start simple I want to turn a regular DataGridTextColumn into a DataGridComboBoxColumn. E.g just display the cell text on the dropdown, and doesn't matter if the dropdownlist is empty. I havn't even managed to do this e.g From `<dg:DataG...

Master/Detail UI Best Practices?

Hi, We have a WPF app that has a master/detail window, both being WPF Datagrids. When you select a row in the upper datagrid, the details are shown in the lower datagrid. I was wondering if there are any best practices from a UI perspective on how to deal with things such as: When the window first opens, no datarow is selected in the ...