HI, i have an entity that contains the name, hire date and annotations about employes. I need to display just name and hire date in columns and when the row is selected, i need to show - as detail row - annotations. how can i do that??
Thanks!
Hi,
We don't have the concept of a DetailsRow specifically, however, i believe you can use our TemplateColumnLayout feature and a little code to achieve what you're looking for.
1. Take a look at this sample: http://samples.infragistics.com/sllob/RunSamples.aspx?cn=grid#/grid/template-column-layout
2. Turn off Expansion Indicators
<ig:XamGrid.ExpansionIndicatorSettings>
<ig:ExpansionIndicatorSettings Visibility="Collapsed"/>
</ig:XamGrid.ExpansionIndicatorSettings>
3. Handle the ActiveCellChanging event to look something like:
private void grid1_ActiveCellChanging(object sender, ActiveCellChangingEventArgs e) { if (e.NewActiveCell != null) { if (e.PreviousActiveCell != null) { if (e.PreviousActiveCell.Row != e.NewActiveCell.Row) { Row r = e.PreviousActiveCell.Row as Row; if (r != null) r.IsExpanded = false; } } Row r = e.NewActiveCell.Row as Row; if (r != null) r.IsExpanded = true; } else if (e.PreviousActiveCell != null) { Row r = e.PreviousActiveCell.Row as Row; if (r != null) r.IsExpanded = false; } }
Hope this helps,
-SteveZ