datagrid

WPF Data Grid Example

I've been experimenting with WPF and just downloaded the toolkit which includes a DataGrid control. Does anyone know where I can find a fully worked through example of binding a database table to the WPF DataGrid? ...

What's wrong with my XAML?

I'm trying to get a simple data grid working under WPF, and I have no idea why it's not working. Here is the XAML - <Window x:Class="WpfApplication2.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="333" Width="592"> <...

apply style to infragistic datagrid

hi i have downloaded infragistic datagrid , its working fine but i don't know how to apply styles like, header column fore color ,back color,row alternate color etc..am new to wpf can any one hepl me thanks in advance.... ...

WPF Toolkit: how to scroll datagrid to show selected item from code behind?

I tried following, all of following fails on function ScrollIntoView and gives NullReferenceException. // doesnt work grid.SelectedItem = sItem; grid.ScrollIntoView(sItem); // doesnt work grid.SelectedItem = sItem; grid.Focus(); grid.CurrentColumn = grid.Columns[0]; grid.UpdateLayout(); grid.ScrollIntoView(sItem,grid.Columns[0]); // d...

How do I edit data being bound to a datagrid?

In reference to http://stackoverflow.com/questions/1975229/link-loaded-into-my-gridview-try-to-navigate-to-my-local-server. The columns I have in the datagrid are Customer #, Description, Link. I've got a function set up that's called on rowDataBound, but how do I retrieve what link is in the row so that I can edit it, and then rebind i...

How to synchronize column widths between two nested datagrids?

I have a wpf toolkit datagrid with a few columns, then inside the row details I have another datagrid. Basically I am emulating a treelistview control (example: http://www.codeproject.com/KB/list/treelistview.aspx) but using datagrids. I would like to sync the column widths of the datagrid in the row details with the column widths of th...

Why is DataGrid "Auto" width so huge all the sudden?

I have been working on an app with a datagrid from the wpf toolkit and the width was not specified in the xaml (default to auto), and it was working fine. It would extend the window width as I resized the window. However, all the sudden the "auto" width is massive and I don't know why. When I pull the xaml file up in blend it shows auto ...

wpf datagrid cell content changes, when it's not supposed to

Hi, I have a textbox which, when typing in it, selects the Item in my WPF datagrid with the matching item, however, it changes the first item as well to what is typed in the textbox before going to the matching item in the grid. I'm not sure how that is possible? Can someone help find what's wrong? The search is only performed on the...

Can I update the UI from a LINQ binding?

This little bit of code will help me describe my problem: public class Car { ... } public class CarQueue : ObservableCollection<Car> { public IEnumerable Brands { get { return (from Car c in this.Items select c.Brand).Distinct(); } } } Ok now I have an instance of CarQueue class bound to a DataGrid. When I add...

Itemrendrer : Adjusting container height to Text height to avoid text truncation

hi, I have a datagrid with variable height. I have written a Itemrendrer for rendrering data. now there is one more part that is the text field. i would like to resize the comtainer height to that of the text field so that the text doesn't get truncated. Thanks sohil Following are my classes Auto Resize Text Area package { import ...

Dynamic datagrid Httpservice

I receive from the httpservice with a certain frequency a string like this: 1#3#234525234 where row#column#value I want to display into datagrid the above string at real time; at the moment my code displays the whole string, composed by many strings like the one above. How can i solve the problem? Thanks in advance I have the following ...

Flex dataGrid how to color empy rows?

My problem is that empy rows (if there are more rows that dataSource items then there are empy rows) look identical to rows binded to dataSource items which are empy (see the difference?). The only way to know the difference is to hover over them with the mouse, and if they are empty there's no color change, otherwise there's the blue b...

How to delay the setting of bound SelectedItem in a DataGrid

I have a master-detail display in a single Silverlight view. The master is a DataGrid of partially populated items. When I select an item in the DataGrid, my service returns a fully populated data object, which is rendered in the Detail view. This causes a problem when the user scrolls the data grid with the keyboard cursor keys because...

Setting WPf Datagrid Combobox value to its respective textbox

I am having a textbox and a combobox as a template column. Below is XAML <wpfkit:DataGrid Margin="3" Style="{DynamicResource SimpleDataGrid}" FontWeight="Normal" MaxHeight="100" CanUserAddRows="True" ItemsSource="{Binding Source={StaticResource odpExistingGHSCodesColl}}" AutoGenerateColumns="False" Name="dgGHS" VerticalScrollBarVi...

wpf scrollbar glitch

I have a customized datagrid inside of a TabItem. The TabItem has a scrollbar. When I select an item in the datagrid, the tabitem/scrollbar view snaps to the top of the DataGrid. The datagrid selected event has an empty handler. which is a bummer because I can't find a cause in the code for the selection side effect i'm seeing--let alon...

Change column headers on datagrid. CF

How could one change the header text on a datagrid when using data binding in .NET CF? ...

WPF DataGrid - Dynamic Row Details via Code

I have the need to show RowDetails in the WPF DataGrid when the user performs an action outside of the grid. The thing is though, I need to be able to switch out exactly what the RowDetails will be based on that. For example, if the click Add, I want to show RowDetails below Row of type AddRowDetailControl, and if they choose Edit, I wo...

Causing Row Selection in custom Row Template - MS WPF DataGrid

I have a custom row template to show some data, and it doesn't use a SelectiveScrollingGrid in its' template. I don't mind handling the events on my outer elements, but I can't seem to figure out how to cause a "Select" behavior. Typically I've been causing it by raising the MouseLeftButtonDownEvent on the active DataGridCell, but now th...

Silverlight datagrid image

In silverlight app, I have a datagrid with image as first column (please see the code below that I am using) when I click on the image I am capturing MouseLeftButtonDown event, the problem I am running under is that while clicking on the image the SelectedIndex in the Datagrid is not changing Hence I don't know which row was clicked. <...

Prevent displaying of some data in last row of Flex Datagrid

Hello! I have some DataGrid with editable rows, which has also an option to add new row 'dynamically'. I mean, last row has some default data (e.g. "CLICK HERE TO ADD NEW ROW") and when user clicks on it, he can edit that value and new row will be eventually inserted. However, I also have a column in same DataGrid which doesn't come fro...