Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4
We have a problem with check boxes on a XamDataGrid where it requires two clicks to modify the value, which is frustrating to our users. We have modified the CellClickStyle but none of the settings work for us.
With cell click style as default, I cannot select multiple cells by dragging the mouse over fields with check boxes, but I can with regular text fields. The only way I can select the sell is by holding the Ctrl key, but this is not ideal. Check boxes should work the same way as regular text fields.
If I set the cell click style to SelectCell, I’m able to select multiple cells with check boxes, but now I need to double click to change the value of the check box, the first click selects the cell, and the second click enters edit mode. This is not acceptable.
Is there a solution where the cell with check boxes can be multi-selected and it requires only one click to modify the cells value? I attached a sample to help demonstrate our problems.
Hello,
It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking through your post and the sample project you have provided and I modified it, so now when the CellClickAction is set to SelectCell you can change the Boolean Cell’s Values with one click.
Feel free to write me if you have further questions.
Hi,
I am facing the same problem as mentioned above.
I tried setting CellClickAction="SelectCell", but that did not work. I still need to click twice to select a checkbox. Please suggest.
Did you try the sample project, that I have attached in my previous post?
Looking forward for your reply.
removing CellClickAction="SelectCell" is not good enough to me, because i want the rest of the grid still in cell mode. I ended up keeping CellClickAction="SelectCell" on Grid.FieldSettings, but set CellClickAction="EnterEditModeIfAllowed" on FieldLayouts[0].Fields[0].Settings (my 0th column is a checkbox, I did this in xaml declaritively)
works quite well for me. Tabbing will land directly on checkbox, which is great. only caveat is that clicking in the cell, but outside checkbox will not select cell, which is still acceptable to me. when navigating cells using arrow keys, the focus lands on cellvaluepresenter, which means a space bar will not check the checkbox. i got around that by having a codebehind on cellvaluepresenter.
Thanks.
The issue is resolved on removing CellClickAction="SelectCell"
I have been looking through your sample project and I noticed that you set the XamDataGrid’s CellClickAction Property to SelectCell, which cause the behavior you described. When this Property is set like this it takes one click to select a cell and double click to enter EditMode, no matter what type is the Cell’s value and the Editor. So if you want to change the CheckBox value with one click I suggest you leave the default value of the CellClickAction Property, and if you want to be able to select the Cells and change the CheckBox value with one click I suggest you see the sample I attached in some of my previous posts. Please let me know if you need further assistance on this matter.
Thanks for your reply.
I had a look at the solution provided by you, it works. On doing the comparison with my project I could replicate the issue in the solution given by you. On using a FieldLayout and specifying the Fields that i need to show, the issue replicates. Following are the changes I made in your code.
-- xaml
<
Grid>
<StackPanel Orientation
="Vertical">
="Top">
>
="Checking this box means that all trades with this counterparty should be considered CLEARED trades for the purposes of the PRCS report Cleared/Uncleared logic">
="SelectCell">
-- xaml.cs
public partial class TestView : UserControl
{
TestView ()
InitializeComponent();
>();
table.Add(
.Now));
.DataContext = table;
}
TestData
date)
Dosage = dosage;
Drug = drug;
Patient = patient;
Date = date;
; }
</Grid