datagrid

Binding double click of a row to a command in a Silverlight Data Grid

I want to be able to route the double-click of a grid to a Command. I'm using Rx to simulate the double click but I can't figure out what control to attach the mouse handler to (the mouse event on the e.Row object in DataGrid.RowLoading event doesn't seem to work). Anyone got any ideas? Rx code for handling the Double click is as foll...

WPF Datagrid : Programatically bringing a column into view (horizontal scroll)

I would like to bring a column into view programatically. I have a lot of columns and when they are off screen i would like to select a cell and bring that cell into view, i can select a cell that is off screen and when i horizontal scroll to bring the cell visible the cell is selected. i know you can do this with the rows, i.e Scroll...

Python: creating a grid

Is it possible to create a grid like below? I didn't found anything in the forum. #euler-project problem number 11 #In the 20 times 20 grid below, #four numbers along a diagonal line have been marked in red. #The product of these numbers is 26 times 63 times 78 times 14 = 1788696. #What is the greatest product of four adjacent numbers i...

WPF UI automation - Doesn't support rows? (or how can I select and deselect an entire row)

Note: This is no longer an issue, the .NET 4 built-in DataGrid solves this problem I have a WPF app which is using a DataGrid; I'm using the WPF ui automation API to write some automated tests for it. The DataGrid is the WPFToolkit one, I'm using the .NET 3.5SP1 with VS2008, and, the datagrid has multi-select enabled. Where I'm at is...

How can I center align the content of a header template for a Silverlight 3 datagrid?

Hi, I would like a checkbox in the header of my datagrid, however, I can't seem to center align the checkbox. This is my xaml: <data:DataGrid x:Name="myDataGrid" VerticalAlignment="Top" Width="300" Grid.Column="0" AutoGenerateColumns="False"> <data:DataGrid.Columns> <data:DataGridCheckBoxColumn Binding="{Bin...

Problems with checkboxes in Datagrids

Hello, I am having some trouble with CheckBoxes in a DataGrid. The CheckBoxes are not bound to the entities that are populating the datagrid because there isn't a property on the entities for it. Basically what I am trying to do is when I check a CheckBox I add the ID of the item in that row to a list to be returned. The problem I am ha...

How to bind objects list to infragistics data grid?

Pretty simple task, but the source code doesn't do required job... Please advise. There is Products collection in the class (approach is based on the MVVm pattern, but that is not influe on the current issue): public class ProductWindowViewModel : WorkspaceViewModel // implements INotifyPropertyChanged { public ProductWindowViewMod...

Error With DataPager and DataGrid/DataForm

Does anyone know what this error means? I get it when I try to page past page 80 if I have more than 161 pages in a DataGrid. System.InvalidOperationException: Cannot Change currency when an item has validation errors or its being edited and AutoCommit is false ...

how to update a cell in DataGrid which is binded with string[][] array

I have a DataGrid and a string[][] dataSource array as a source data for this DataGrid. I use following code to set binding: dataGrid.ItemsSource = dataSource; for (int i = 0; i < columns; i++) { dataGrid.Columns.Add(new DataGridTextColumn { Binding = new Binding(string.Format("[{0}]", i)) }...

Databinding of WPF Toolkit DataGrid to LINQ to SQL queries

When binding WPF Toolkit DataGrid to SQL database through LINQ to SQL, how to correctly set binding source: should it be some generic collection, filled and updated by LINQ to SQL queries or there is a possibility to directly connect DataGrid with LINQ to SQL queries? ...

dojo datagrid custom sorting server side

Hello I am using dojo.data.ItemFileWriteStore to draw a dojo datagrid (which works fine) and the grid shows properly. I was using client side sorting and that was also working fine. but now I need to change the sorting and do that server side. For this I am trying to use onHeaderCellClick event, using which I am able to run a javascript ...

WPF Datagrid binding to list problems

I have a list of custom objects: say Fruits with two string properties Name and Color. These are in a List. private readonly List<Fruit> fruitList = new List<Fruit>(); Then I load fruit objects into the list. I am trying to bind this list to WPF Datagrid: C#: dgFruit.ItemsSource = "{Binding}"; XAML: <toolkit:DataGrid Name="dgFru...

Flex Cairngorm - How to update the model without losing focus in Datagrid ?

Hi, In my Flex Project using Cairngorm, I have a model that stores a bindable ArrayCollection displayed by a DataGrid. My problem occurs when the model is updated by the responder (from a Java service, after an "update" event), because the focus located in a cell of the DataGrid is lost (the scroll position il also lost). So, I retrieve...

How to make datagrid selection and hover effect (blue color) programmatically

Hi everybody, I have two datagrids which should do everything synchronic except the data entry. I already managed to make them scroll synchronic by using the scroll event. My question is now how to select a item of a datagrid only programmatically, and how to get the mouseover effect and underlining the corresponding row with a bright b...

How can I put a Silverlight 3 DataGridCell into edit mode in code?

I want to be able to pick a specific cell in a Silverlight 3.0 DataGrid and put it into edit mode. I can use the VisualTreeManager to locate the cell. How do I switch to edit mode? Each DataGridCell looks like this in the VisualTreeManager: System.Windows.Controls.DataGridCell System.Windows.Controls.Grid ...

Pylons Toscawidgets DataGrid what data format

Hello I can't seems to work out how to fill the toscawidgets DataGrid. In my controller I have: dgfileds = [('Email Address', 'email'), ('Logon ID', 'id')] c.data = [ dict(email ='[email protected]', id='1'), dict(email ='[email protected]', id='2') ] c.grid = twf.DataGrid(fields=dgfileds) In my mako tem...

Flex : Detect "tab" key press from the last cell of a DataGrid

Hi, In a Datagrid, how to detect when the user press the key "Tab" from the last cell ? With KEY_DOWN event the selected cell is unknown, with FOCUS_OUT we don't know the key pressed. Thanks in advance ...

Flex DataGrid ItemRenderer Issue

I have a grid filled with >1000 datasets. one column uses a custom itemRenderer which is used to display the value of a foreign key. All the datasets which are displayed without scrolling are displayed with the right information. But when it comes to scrolling, some datasets will have displayed the wrong value in the itemRenderer. As fa...

How to Get the number of the displayed row in wpf datagrid

Hi: For winform datagridview , we can use "DisplayedRowCount" to get the number of the displayed row, How can i get it for wpf datagrid. Thank you~~ Rui ...

Dynamic columns with Silverlight DataGrid

I'm trying to add columns to a Silverlight DataGrid but having problems. In my View (I'm using Prism) I can add the columns in the constructor no problem, this works fine - public MyView() { InitializeComponent(); myDatagrid.Columns.Add(new DataGridCheckBoxColumn() { Header = "HELLO!" }); } However if I attempt to add a column w...