In the "Samples Browser", there is a sample about "CheckBox in Unbound Field", but the cells in the checkbox column cant be selected, copy and paste. What I want to do is how to implement these features?
BTW, if I directly set the "EditType" to the "bool", the TwoWay become useless, the set block of the property will not be called. I have no idea why.
Hello,
I have been looking into your post and I can suggest you set the ‘CellClickAction’ property to “SelectCell”. For more information please look into the following link :
http://help.infragistics.com/Help/NetAdvantage/WPF/2010.2/CLR4.0/html/InfragisticsWPF4.DataPresenter.v10.2~Infragistics.Windows.DataPresenter.FieldSettings~CellClickAction.html
To allow clipboard operations, please look through the link below :
http://help.infragistics.com/NetAdvantage/WPF/2012.1/CLR4.0/?page=xamDataPresenter_Enable_Clipboard_Operations.html
If you need any further assistance on this matter, feel free to ask.
Thanks for your reply.
After I set the ‘CellClickAction’ property to “SelectCell”, I need select the cell by the first click, and change the state of checkbox by second click. Is there any solution to do the select cell and change the state of checkbox by the once click?
I have been looking into your question and I can suggest setting ‘CellClickAction’ property to “EnterEditModeIfAllowed”.
If you need any further assistance on this matter, do not hesitate to ask.
Ah, in that case, user cant select multi-cells by drag mouse.
I am glad that you have managed to resolve your issue.
If you need any further assistance, feel free to ask.
Thank you a lot, I have implemented that by another way, I set all the fields' ‘CellClickAction’ property to “SelectCell”, and implemented the Style of XamCheckEditor by this way:
<Style TargetType="{x:Type igEditors:XamCheckEditor}">
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center" />
<EventSetter Event="MouseLeftButtonDown" Handler="ChangeCheckboxStatus"/>
</Style>
private void ChangeCheckboxStatus(object sender, MouseButtonEventArgs e)
{
var xamCheckEditor = sender as XamCheckEditor;
if (xamCheckEditor != null)
xamCheckEditor.StartEditMode();
xamCheckEditor.IsChecked = !xamCheckEditor.IsChecked;
xamCheckEditor.EndEditMode(true, true);
}
I have been looking into your last post and this is the default behavior of the XamDataGrid when the ‘CellClickAction’ property is set to “EnterEditModeIfAllowed”. I can suggest you allow entering in edit mode only for the column with the XamCheckEditors by defining a field layout like e.g. :
<igDP:XamDataGrid.FieldSettings>
<igDP:FieldSettings CellClickAction="SelectCell"></igDP:FieldSettings>
</igDP:XamDataGrid.FieldSettings>
<igDP:XamDataGrid.FieldLayouts>
<igDP:FieldLayout Key="Cars">
<igDP:FieldLayout.Fields>
<igDP:Field Name="Make" Label="Make" />
<igDP:Field Name="Model" Label="Model" />
<igDP:Field Name="BasePrice" Label="BasePrice" />
<igDP:Field Name="Mileage" Label="Mileage" />
<igDP:Field Name="Flag" Label="Flag">
<igDP:Field.Settings>
<igDP:FieldSettings CellClickAction="EnterEditModeIfAllowed"/>
</igDP:Field.Settings>
</igDP:Field>
</igDP:FieldLayout.Fields>
</igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>
and handling the ‘PreviewMouseLeftButtonUp’ event in order to start the edit mode for other cells on mouse click when you do not want to select multiple cells by mouse dragging :
private void xamDataGrid1_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
if (xamDataGrid1.SelectedItems.Cells.Count == 1)
xamDataGrid1.ExecuteCommand(DataPresenterCommands.StartEditMode);
If you have any other questions on this matter, feel free to ask.