Is it possible to remove an unbound field from the tab order. For Example, in the NetAdvantage Feature browser samples, under XamDatagrid/Data Binding and Interaction/Unbound Fields there is a "Total" column. How can that column be removed from the tab order and not obtain focus when tabbed into or clicked (including not getting a dashed border around it)
Thanks
Rod
Hello Rod,
This sounds like the same requirement in this forum thread :
http://community.infragistics.com/forums/p/2177/103393.aspx#103393
Not exactly the same - their example uses a field - not an UnboundField. I have already tried the basic AllowEdit=False and Focusable=False and they do not work.
In our scenario the column cannot be clicked on - BUT if you tab through the columns, the Unboundcolumn will get a dashed border around it when tabbed onto. Basically the field should not be a tabstop.
Basically all we are trying to do is place a label within a datagrid cell.
<Style x:Key="SillColumnStyle" TargetType="{x:Type igDP:CellValuePresenter}" > <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}" > <Label HorizontalAlignment="Left" TabIndex="0" IsTabStop="False" Focusable="False">Sill:</Label> </ControlTemplate> </Setter.Value> </Setter></Style>
<igDP:UnboundField > <igDP:Field.Settings> <igDP:FieldSettings AllowEdit="False" CellValuePresenterStyle="{StaticResource SillColumnStyle}" /> </igDP:Field.Settings></igDP>
any Suggestions?
Rod,
Unbound or not, this should not matter. I am not sure if you have looked in the forum thread that I provided, but the idea is to handle the activation of the cell and switch the focus if you need to. I was referring to following code sample:
void xamDataGrid1_ExecutedCommand(object sender, Infragistics.Windows.Controls.Events.ExecutedCommandEventArgs e)
{
if (e.Command == DataPresenterCommands.CellNextByTab)
if (xamDataGrid1.ActiveCell.Field.Settings.AllowEdit == false)
xamDataGrid1.ExecuteCommand(DataPresenterCommands.CellNextByTab);
}
if (e.Command == DataPresenterCommands.CellPreviousByTab)
xamDataGrid1.ExecuteCommand(DataPresenterCommands.CellPreviousByTab);
This solution has worked so far for most scenarios. However, I am running into a situation where I am getting a StackOverFlowException because the XamDataGrid_ExecutedCommand was getting called recursively. This occurs when you have fields in the xamdatagrid that are NOT editable (AllowEdit = false), and there are many records in the grid. The ExcecutedCommand gets called for each cell in the grid, and by the time I get to the 136th cell, I get a StackOverFlowException. Do you have a recommendation for this scenario?