Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2320
Selecting newly added row
posted

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.

Parents Reply Children
No Data