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
1540
RowAdded event not firing
posted

I know this because I put a breakpoint on the event handler and its not breaking as I add items to the collection.

Here's where I'm setting the event handler (in the USERCONTROL's Loaded handler:

this

 

.selectedAttributes.RowAdded += new EventHandler<Infragistics.Controls.Grids.RowEventArgs>(selectedAttributes_RowAdded);

Here's where I'm connecting the ObservableCollection to the XamGrid:

cvsSelectedAttributes.Source = vm.SelectedAttributes;
selectedAttributes.ItemsSource = cvsSelectedAttributes.View;

In case its not obvious:
vm.SelectedAttributes is an ObservableCollection
cvsSelectedAttributes is a CollectionViewSource
and selectedAttributes is a XamGrid

I've already tried removing the CollectionViewSource and connecting the ObservableCollection directly to the grid, like so:

selectedAttributes.ItemsSource = vm.SelectedAttributes;

It didn't help.

Here's the event handler:

 

 

 

 

void selectedAttributes_RowAdded(object sender,
Infragistics.Controls.Grids.
RowEventArgs e)
{
   
SelectedAttributes dataGrid = (SelectedAttributes)sender;

 

 

    if (dataGrid != null)
    {
        dataGrid.ScrollCellIntoView(e.Row.Cells[0]);
    }
}

The items are appearing as new rows in the XamGrid.  Why on earth is this event not being fired?  Am I missing a property setting or something else?

Pleas help ASAP!

Parents Reply Children
No Data