wpfdatagrid

Need Help for Listview WPF events for finding index of rows and columns

I have a listview in WPF and i displayed data in line by line manner,i want to just find the indexs of the rows and columns,i am new to WPF,plz give me some idea about this. <Grid Margin="3"> <Grid.RowDefinitions> ...

How to bind collection to WPF:DataGridComboBoxColumn

Admittedly I am new to WPF but I have looked and looked and can't find a solution to this problem. I have a simple object like: class Item { .... public String Measure { get; set; } public String[] Measures {get; } } Which I am trying to bind to a DataGrid with two text columns and a combo box column. For the combo box column,...

Unable to display data in a WPF datagrid that has a DataView instance as the items source

I am using a DataGrid object from the WPF toolkit. I am binding the DataGrid object to the default view of a DataTable instance as declared in the following code: WeatherGrid.ItemsSource = weatherDataTable.DefaultView; weatherDataTable has three columns. The first column is defined to contain a string data type. The other two colum...

How i access DataGrid(DataGridTemplate) in xaml.cs

Hi, <dg:DataGridTemplateColumn Header="Alerts"> <dg:DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBlock></TextBlock> </DataTemplate> </dg:DataGridTemplateColumn.CellTemplate> ...

WPF datagridtextcolumn - always show textbox

Hello, By default the WPF datagridtext appears as a label and enters an edit state upon clicking. Is there a way to modify the column so that the textbox is always visible (instead of depending on the click event)? Thanks in advance, JP ...

Append DataGrid inside of DataGrids RowDetailsTemplate

this appears to bind, but rows in Details Grid are empty. Something is off/missing? I've also tried {Binding SubCustomers} SubCustomers is a List on parent object. I am able to bind this way to single Fields such as FirstName etc.. just not the subcollection.. <DataGrid.RowDetailsTemplate> <DataTemplate> ...

WPF DataGrid add Hypherlink column

hi can anyone tell how to add hyperlink column to wpf data grid when item source set to some data table... its throws me err that..itemsource alreaady set, when i try including datagridTemplateColumn.. help!!!! ...

WPF Add Events in Resource file

Hi I am designing an user control in which i am using datagrid.. now i wanna to raise hyperlink click event to the parent window(where i am using user control) how to do this... Questions i have.. 1)I declared my data grid inside resource file.. now when i add evend handler for the hyperlink its asking for the x:class attribute in re...

Mouse scroll not working in a scroll viewer with a wpf datagrid and additional UI elements

I am trying to figure out how to get the mouse scroll working on a wpf window with a scrollviewer and a datagrid within it. The WPF and C# code is below <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto"> <Grid> <Grid.RowDefinitions> <RowDefinition/> <RowDefiniti...

Taking out FilterRow from XCeed DataGrid control

Is it possible to pull out filter row from XCeed DataGrid control to some other place like group box ? If possible, how ? Any pointers will be appreciated. Please consider scenario given below where when I click on Filter button, Product Name column will be filtered according to filter query. For doing this scenario I need to take out F...

wpf 4.0 datagrid template column two-way binding problem

Hello all! I'm using the datagrid from wpf 4.0. This has a TemplateColumn containing a checkbox. The IsChecked property of the checkbox is set via binding. The problem is that even if I specify the binding mode explicitly to be TwoWay, it works only in one direction. I have to mention that the same code works perfectly in .net 3.5 wi...

Wpf datagrid row not updating when binded collection updated?

I have product class named-Products.cs class Products : INotifyPropertyChanged { private int productId = 0; private int quantity = 0; private string description = string.Empty; private decimal price = 0.0m; public event PropertyChangedEventHandler PropertyChanged; public Products() { } private void...

Conditionally making readonly to WPF DataGridCell

Hi All, I have a situation that needs to conditionally make readonly to wpf datagrid cell. There is IsReadOnly property in DataGridCell. But unfortunately, that property is readonly! Is there any way to do it? ant. ...

Datagrid nested inside another datagrid's RowDetailsTemplate breaks mouse wheel scrolling

I have a DataGrid "nested" inside another DataGrid's RowDetailsTemplate. Scrolling works fine whenever my mouse is over the main portion of the row on the parent DataGrid, but when the mouse is over the DataGrid nested inside the RowDetailsTemplate, it stops scrolling. Here is the DataGrid setup: <my:DataGrid Margin="-2,36,-2,1" ...

WPF RowDetailsTemplate width issue

Apologies if this is a dupe, but I can't seem to find a rational solution for what must be a fairly simple issue. <Window x:Class="FeedTest.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Window.Resources> ...

WPF - How do I style a row based on a binding property value?

Hey! So I am trying to bind a collection of objects (IList<>) to a WPF datagrid. I would like to make the row background a different color if the 'artist' property is null or empty. I am checking the value stored at the property on the LoadingRow datagrid event. Currently my implementation seems to style all of the rows with an empty or...

Using a Datagrid as a Datagrid.RowDetailsTemplate

Hey Guys, I want to use a Datagrid as conten of another Datagrid's RowDetailsTemplate. It works nerarly perfect, but there is the problem, that the child Datagrid ColumnDefinition seems to have no effect. Here is my Code: <toolkit:DataGrid VerticalAlignment="Top" HorizontalAlignment="Stretch" AutoGenerate...

wpf toolkit (Feb 2010) datagrid with MVVM - style reveals name of view model on 'spare column'

Hi, I've just updated my app with the latest WPF toolkit and I've now got an issue with my styling. When I bind some data with, for example, two columns to the grid, the header in the spare area at the right shows the name of the ViewModel. So if I bind an IEnumerable with two columns the Grid Header looks like Column1, Column1, [Nam...

Bind a WPF data grid to multiple data sources

I have created a data grid in WPF and have 2 lists. I want to bind one column to one list and rest of the columns to another list. Can anyone please tell me how to do this? Thanks ...

How to correctly bind an object to a WPF DataGrid?

I'm trying to get a WPF DataGrid to work from a user control I'm building. Things seems to work fine. But I noticed this message in the Output window in the IDE: System.Windows.Data Error: 39 : BindingExpression path error: 'Name' property not found on 'object' ''Object' (HashCode=18165668)'. BindingExpression:Path=Name; DataItem='Obje...