wpfdatagrid

LINQ to SQL:Space in Alias name for Datagrid column header

I know we cant use space in alias names when graming a LINQ 2 SQL expression.I am trying to bind the result to a datagrid in my WPF page.so now the column header are what i gave in the Alias.I just want to rename it to some thing else (Ex : From ItemName to Item Name ) The code which i have Dim items = From p In objDB.ItemDetails Wher...

Why DataGrid in WPF 4.0 doesn't show Data?

So i Got a tmplist of ObservableCollection in which i got few elements. I connect it to the ItemsSource of DataGrid in WPF 4.0 and it doesn't show anything. Doesn't add any colums. If I add breakpoint I can see that the "ItemsSource count equals quantity of tmplist elements, but the Columns count equals 0. Why is that? Here is some code...

WPF binding number into different a datacolumn

Is it possible to binding a number to a datacolumn which has no number in it. For example I store the priority in the database as 1, 2, 3 and in the datagrid I want this represented as Love, Medium, High. How can I bind this to the datacolumn, and match it to the correct one? <dg:DataGridComboBoxColumn Header="Priority" SelectedItemBi...

Change EditableObject behaviour on WPF Datagrid

I have a WPF Datagrid (.NET 4.0) with a list of viewmodel bind to ItemsSource. The viewmodel exposes the model entity that is builded from a base ancestor class that implements IEditableObject interface. Every time I edit a cell of a datagrid row the beginedit method of entity is called; I would a different behaviour: call the BeginEdi...

wpf data grid - moving from one cell to another cell

how to capture event when moving from one cell to another in same row. ...

Displaying 24hr clock in WPF Datagrid

I was wondering, how do I show a 24hr clock in a WPF datagrid? At the moment, the datagrid has set itself to 12 clock, using am & pm which is just plain confusing. In the datagrid it has a simple column binding ...and I get the following 6/29/2010 10:46:42AM 6/29/2010 11:14:10PM ...

How to get datagrid to show in toolbox

Hi, I am new to wfp and am looking for the datagrid tool, how do I add it to the toolbox. I have checked in the options and it all appears checked etc. Thanks, R. ...

Spanning a Record Over Multiple Rows in WPF Toolkit's DataGrid

Hello, Is it possible to style WPF Toolkit's DataGrid so a data record can span multiple rows. Example screen shot from a commercial control. Thanks, Ben ...

Binding DataGridComboBoxColumn ItemsSource to RelativeSource FindAncestor doesn't work

Hello, I'm trying to use WPFToolkit's DataGrid control (and C#/.Net 3.5) to display a ComboBox per record. With the below code, the ComboBoxes show up but their drop-downs contain no items: <wpftkit:DataGrid ItemsSource="{Binding TransactionToEdit.SisterTransactions}" AutoGenerateColumns="False"> <wpftkit:DataGrid.Columns> ...

Simple WPF 4 Question: DataGrid of List of Objects is showing no records

This is driving me nuts. I have a datagrid in WPF that is not populating with records at runtime. Here is the XAML. I've done this before in Silverlight although I am a newbie and can't quite figure out what is missing. <DataGrid AutoGenerateColumns="True" Height="335" HorizontalAlignment="Left" Name="DataGrid1" VerticalAlignment="To...

DataGridTemplateColumn doesn't support direct content?

I know I did this in Silverlight... In WPF 4 I am trying to put controls in a DataGridTemplateColumn element in DataGrid XAML I can't add anything to it and I get errors saying it doesn't support direct content. WTF? I want to put in maybe a hyperlink, textboxes, a button, etc. I can't even add a canvas. ...

How to bind a windows control in WPF????

I'm using WPF 4.0. I have a WPF Datagrid. One of my column in a datagrid is a template column. In that template column I have used Win forms Textbox and my problem is that, How to bind that win forms texbox control in WPF? How to access that control or column in Code behind (c#)? ...

WPF Datagrid sorting on a column bind to XML containing umbers

Hi, I am binding my WPF Datagrid to an XML source. I have a DataGridTextColumn column representing the Id of my object. When I sort on that column, it gives me for example: 1, 12, 13, 2, 3, 31, 4. I obviously would like to sort it as 1, 2, 3, 4, 12, 13, 31. Is there a way to specify that I want to sort the column based on the integer...

WPF DataGrid - Hiding Column using a CheckBox

I am trying to control the visibility of a column using a checkbox (this is in WPF 4.0). Here is a snippet of my XAML: <Window.Resources> <BooleanToVisibilityConverter x:Key="BoolToVisConverter" /> </Window.Resources> <CheckBox x:Name="GeneralDetailsVisible" Content="General Details" Margin="5"/> <DataGridTextColumn Header="Crew...

.Net v4 DataGridTextColumn.IsReadOnly seems to be faulty

If I create a binding to the IsReadOnly property of the DataGridTextColumn, it does not actualize. If I set it through markup, it works. <DataGridTextColumn IsReadOnly="{Binding IsReferenceInactive}"/> <!-- NOP --> <DataGridTextColumn IsReadOnly="True"/> <!-- Works as expected, cell is r/o --> The IsReferenceInactive property is a ...

WPF: How do I cause the DataGrid to recalc column widths?

I have a DataGrid that is bound to a drop-down list. Each time I change the selected item in the drop-down list, the grid's ItemSource changes. When this happens, the columns are automatically made wider if necessary. My problem is that the columns are never made narrower. They just keep getting wider and wider until they reach the ma...

Entity Framework EntityCollection in a WPF DataGrid

B"H I was wondering if there is any simple way to represent an EntityCollection (from a navigation property) in a WPF DataGrid. Specifically the issue is with deleting items. Displaying, Updating and even Adding items works fine. However the EntityCollection's Remove function only deletes the relationship, not the object. So when the ...

WPF access DataGrid row element

Hello, I've a got strange situation. I've got a datagrid, and in one of the columns is a datepicker and checkbox. The checkbox if selected will disable the datepicker. ***************************** * | * * DatePicker | Checkbox * * | * ***************************** I've had a stab at thi...

Code to check if a cell of a DataGrid is currently edited

Is there a simple possibility to check if the DataGrid is currently in EditMode (Without to subscribe to BeginningEdit and CellEditEnding) ...

WPF: What is the DataGrid's version of TextSearch.TextPath?

I want to use type-down in data grids. With combo boxes this is just the TextSearch.TextPath property. What property/code would I need for data grid? ...