>>I have a data grid bound to any number of rows, most of the time just one, but when the grid receives focus, I really need the first cell of the first row to recieve editable focus. Any ideas how to do this?
>
>Something like this in the GotFocus() might work:
DG.CurrentCell = new DataGridCellInfo(DG.Items[0], DG.Columns[0]);
>DG.UnselectAllCells();
>DG.SelectedCells.Add(DG.CurrentCell);
>DG.BeginEdit();
But I've a feeling the user would find it a bit disconcerting. The OnFocus only fires when they click on an actual cell and that may be the cell they actually want to edit? Also if there's a scrollbar and the user uses it then the OnFocus fires when they move back to the Grid
Good points Viv, I suspect I don't want the focus moved around every time that event fires. Maybe only when the expander gets focus, a tab could move to the first cell of the first row. After that, the tab inside the grid would work normally.
Timothy Bryan