I have a large silverlight project that uses both xamWebGrid and datagrid. When a new row is being added to a datagrid we add it, select it and set focus. Here is the code-behind
private void btnAdd_Click(object sender, RoutedEventArgs e){ TxnRow newRow = AddTxnRow(); dataGrid.SelectedItem = newRow; dataGrid.ScrollIntoView(newRow, dataGrid.Columns[0]); dataGrid.Focus(); dataGrid.BeginEdit(); }
How can I do this in the xamWebGrid? I basically want to select the newly added row and scroll it into view? I can't get past the first part, finding the newly created row and selecting it.
I wanted all grids to look similar is why I'm not using the AllowAddNewRow xamWebGrid functionality.
Any help would be appreciated.
Just checking is this bug fixed or not? I am adding new rows to the grid and wanted to know how to set focus to the row that newly added . Thanks
There is a bug logged regarding the same issue with an id of #26536. It should be addressed for the next service release. I'm going to create a support ticket so you can be notified when this is resolved.