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
310
Xamgrid master / details failed
posted

Hi,

I trying to create master/details interface with XamGrid,

and I have seen that when I'm navigated on the XamGrid the selecteditem was always the same, you can constate this by using the SelectedRowsCollectionChanged event.

So when I bind a texblock with the SelectedItem it's always the first row of the Xamgrid who is displaying.

Can you help or tell me the way to make it work?!?

If I do the same with the VS2010 controls it's working fine (the textblock content is following the grid selected item), and  just by drag an drop, why not with Infragistics control??!!??

Thanks.

Gilles P

Parents
No Data
Reply
  • 635
    posted

    I accomplish this by setting a cell clicked action on the grid, and setting the Selection settings.

    <igGrid:XamGrid CellClicked="Click_Cell"  ... >

    (columns, other settings)

    <igGrid:XamGrid.SelectionSettings>
        <igGrid:SelectionSettings CellClickAction="SelectRow"
        CellSelection="None" ColumnSelection="None"
        RowSelection="Single" />
    </igGrid:XamGrid.SelectionSettings>
    </igGrid:XamGrid>

    When the cell is clicked, you can get the row by doing the following:

    MyRowType SelectedItem { get; set; }
    private void Click_Cell(object sender, CellClickedEventArgs e)
    {
          SelectedItem = e.Cell.Row.Data as MyRowType;
    }

Children
No Data