WPF DataGrid: edit all cells, new row position, click once to edit - wpf

I was wondering if anyone could point me into the right direction with DataGrids.
I'm trying to position the new row at the top of the grid
When the user clicks a cell all cells in the row move into an editable state.
Cheers

Check this out for single click editing:
http://wpf.codeplex.com/wikipage?title=Single-Click%20Editing
And this for New row formatting:
http://blogs.msdn.com/b/vinsibal/archive/2008/11/05/wpf-datagrid-new-item-template-sample.aspx
I think positioning a new row on top might not be possible as the new item row is not part of the DataGrid's control template. Haven't given it a try though.

Related

Put a Button on first row of WPF DataGrid Columns

I'm working on the WPF application.
My application has a DataGrid with 4 columns which works properly.
I only want the first row to have a Button with DataGrid width for inserting new data by user's click.
First row's columns may be use Column span.
Also I read How to add button in first row of datagrid column? .
This solution Insert Button to All Rows and control with Collapsing .
Thanks in advance for any help

Two radgridviews - programmatically select row on 2nd based on selection on 1st

I have two radgridviews where a row selected on grid #1 by the user appears automatically in grid #2. The new row in grid #2 needs to be programmatically selected as there may be further processing for that new row and the row index is needed.
Both grids use a datatable for their items source.
It is possible that the user can select the same item twice from grid #1. So the selected row in grid #2 must be the most current selection from grid #1.
How do I programmatically select the new row in grid #2?
Thanks
Datagrid in wpf is a derive class of ItemsControl which has the SelectedIndex property which you can use to get the first index of selection in your grid after which you can set the second grid selectedIndex to the first's.
int selectedIndex=grid1.SelectedIndex ;
grid2.SelectedIndex =selectedIndex.

Automatically add row in ng-grid when tabbing last cell

I need one working example, to add row while tabbing last cell
I have four cells in one row once we filled and tabbing from last cell it should be add new row.
I tried but i'm unable to find.
http://angular-ui.github.io/ui-grid/ (Edit On Focus Cell Selection Example)
[http://codepen.io/calendee/pen/buCHf][1]
in inside row i have text inupt.
Thanks
Maybe you can add your logic inside this handler:
$scope.gridApi.edit.on.afterCellEdit($scope,function(rowEntity, colDef){
})

Extjs look and feel

I have very simple grid which contains a lot of data - so my scroll ball is quite narrow. I edit data in cells. Left to my grid there is picture with coordinates points. I wish this behavior: when I click on coordinate point I want to go to corresponding grid row. They are related by id(id row = id point div). How can it be made?
Also when I edit grid in the middle and bind coordinates of new point to row(by using store) - the grid gets automatically reloaded after store is updated - and scroll gets to the top. How can I track last edited row in the middle of the list so I can auotmatically focus on it? Thanx in advance.
use the focusRow method (http://docs.sencha.com/extjs/4.2.3/#!/api/Ext.view.Table-method-focusRow) to scroll where you want, for example :
yourGrid.getView().focusRow(10);
To disable the 'scroll to the top" effect when you reload the grid, set preserveScrollOnRefresh to true on the viewConfig of your grid (http://docs.sencha.com/extjs/4.2.3/#!/api/Ext.view.Table-cfg-preserveScrollOnRefresh).

On Click on the RowHeader the current row should be editable and On click of the columnHearder current column of all row should be editable

I have a silverlight DataGrid, by default on page load the all the cells of the datagrid should be Readonly. I have 2 problem , can any one help me?
1.On Click on the RowHeader the current row should be editable
2. On click of the columnHearder current column of all row should be editable
This might not solve your entire problem but it should partially address it.
This is to make a column read-only in a datagrid
DataGrid.Columns[7].IsReadOnly = true;
Obviously the property can be changed from events but the data grid does not have row/column headers event handlers. Custom controls seem the way to go without introducing any new gui elements like buttons and changing the feel of the application.

Resources