wpfdatagrid

WPF DataGrid RowDataBound?

Ok this is driving me mad, I feel like a total Newbie. I'm using WPF's DataGrid control from WPF Toolkit with .NET 3.5. Link on Codeplex here I want an equivalent to the classic GridView's RowDataBound event, and I can't find any. I tried working with LoadingRow, but it fires every time I scroll. I'm trying to change the background co...

Multicolumn display combobox within WPF datagrid

Hi Experts, I wanted to create custom WPF datagrid control, which allows to have datagridcomboboxcolumn with multicolumn display on selection of combobox, how this can be implemented. Please help Thanks in advance Kartheesh. ...

wpf: DataGrid disable selected row styles - or row selecting

I am seeing a lot of examples on how to style Selected rows in DataGrid such as this one: http://stackoverflow.com/questions/1223280/how-can-i-set-the-color-of-a-selected-row-in-datagrid Can i just disabled selected row styling? i don't want to have to override every single thing that selected row changes. Just don't want any visible c...

How do you set the thickness of the horizontal gridlines in the WPF toolkit datagrid control ?

I am using the WPF toolkit datagrid to display some data and want to increase the thickness of the horizontal girdlines for each row, I would have thought this would be a simple thing to do but i can't find solution. ...

how to make changes to database in WPF?

Drag access database into designer xsd, toolkit:datagrid get datacontext from resources correctly show the table content through this binding. Press button in the button column, can show each row correctly. delete row and add row also work in datagrid however, when i press button column to add a new row or delete a row, there is no chan...

WPF DataGrid : CanContentScroll property causing odd behavior

i have a solution where i generate a DataGrid (or multiple instances) based on user criteria.. each grid keeps receiving data as it comes in via ObservableCollection the problem i had, was that the scroll acted weird. It was choppy, and scrollbar would resize it self while scrolling. than i found.. CanContentScroll property! It comple...

Why aren't the contents of my WPF DataGrid cell aligned?

Hi, I have a WPF DataGrid control I am binding the objects of class Customer to DataGrid Rows using ObservableCollection at run time. I have set MinRowHeight="100" & I want the rows of DataGrid should be HorizontallyAligned at Center & Vertically at Center. Setting DataGrid properties VerticalContentAlignment="Center" HorizontalContentA...

wpf style converter : "Convert" called by every datagrid column using it

I created a converter, and assigned it to a style. than i assigned that style, to the columns i want affected. as rows are added, and while stepping through debugger, i noticed that the converter convert method gets called 1 time per column (each time it is used). is there a way to optimize it better, so that it gets called only onc...

wpf datagrid : row details element positioning

I would like to align elements inside a row details template, with a column position. user can move columns so this value would be changing during runtime. Is it possible to pass a columns position properties to Row Details elements so that they can position accordingly? ...

wpf DataGrid.datagridtemplatecolumn combobox does not update itemssource

<Grid Loaded="Grid_Loaded"> <DataGrid Margin="10,10,10,162" x:Name="dataGrid1" ItemsSource="{Binding myItemsSource}"/> <DataGrid Margin="10,164,10,10" x:Name="dataGrid2" ItemsSource="{Binding myItemsSource}" AutoGenerateColumns="False"> <DataGrid.Columns> <DataGridTextColumn Header="A" Binding="{Binding A}"></DataGridTextColu...

How to apply style for WPF DATAGRID Scrollbars

Hi,, I have a WPF Datagrid control. I want to apply style for scrollbars. It would be nice if u can give me an example for it. Thanx ...

How can we connect the interface (wpf) and MS ACCess database

I've to do a project with Microsoft Access 'we obliged to make with this tool' I've implemented a user interface (bottoms and effects) using expression blend , and I build my database .The problem how can I make the relation between them. as I read that MS can give us the new features in Access 2010, Microsoft can very well decide to go...

WPF DataGrid vertical sizing

I want to place a DataGrid inside a HeaderedContentControl but the the DataGrid does not get a vertical Scrollbar. It appears to be sized to hold all rows at once, the bottom disappearing from view. If I place the same DataGrid in a Border elelemnt I do get the behaviour I want. I have reduced it to this minimal example: <Grid> ...

WPF Datagrid not refreshing properly with MethodParameters

I'm having masses of trouble getting an ObjectDataProvider work with method parameters. Now with the following code, I can view the data in the XAML visual studio designer, however once I try to refresh the ObjectDataProvider my data disappears. I've setup an object data provider with five parameters, although these are not passed to t...

two way wpf datagrid binding to database

HI all, I want to bind WPF datagrid in two way. I had tried following XAML: <Grid> <my:DataGrid x:Name="dataGrid" AutoGenerateColumns="False" Margin="8"> <my:DataGrid.Columns> <my:DataGridTextColumn Header="Header" Binding="{Binding pCode}" IsReadOnly="True" /> <my:DataGridTextColumn Header="Header"...

Complex cell selection contraints with WPF DataGrid

I am trying to work out a way to achieve the following cell selection constraints: Only allow multiple cells from the same row to be selected Only allow contiguous cells to be selected Do not allows cells in column 1 to be selected So far I have looked at SelectedCellsChanged event but that does not seem to want to let me change the ...

How to pass selected radio button in the next window and show that as selected in WPF?

I have a WPF Window with a datagrid dgSample. it has been bound to a list lstSample like this: dgSample.itemssource=lstSample; this datagrid also has a radio button column wherein i select one row by clicking on the radio button, and then, i can move to the next page after i click on the next button. On the next page, there is again t...

How to bind XML with namespace to WPF DataGrid ?

Hello again, I have a use-case where I need to bind data from an XML file to a WPF DataGrid. I prepared this example to demonstrate what I'll be doing in my final code. This is Books.xml: <?xml version="1.0" encoding="utf-8" ?> <library> <books> <book id="1" name="The First Book" author="First Author"> First Book Content ...

How to rotate transform image inside WPF DataGrid cell?

I am rotating an image inside datagrid using animations based on DataTrigger value. It works fine when vertical scrollbar is not visible, but when records are more and vertical scrollbar is displayed and I scrolls up and down other images also starts rotating, which should rotate bcoz there values doesn't matches with condition. Below is...

Emptying WPF datagrid in codebehind

In WPF, I am using the DataGrid from WPF toolkit.Can anyone tell me how can i empty the data in the datagrid in codebehind ? ...