Hi,
I'm using infragistics v12.1.
I have a webdatagrid with enable AUTOCRUD = True.
I can add and edit rows.
Here's my code:
<ig:WebDataGrid EnableDataViewState="true" ID="wdgTables" runat="server" Width="100%"
AutoGenerateColumns="false" EnableAjax="false">
<Columns>
</Columns>
<Behaviors>
<ig:EditingCore AutoCRUD="false">
<ig:RowAdding Enabled="true" Alignment="Top" >
</ig:RowAdding>
<ig:CellEditing Enabled="true" EditModeActions-MouseClick="Single">
</ig:CellEditing>
</Behaviors>
</ig:EditingCore>
</ig:WebDataGrid>
I set the datasource and the columns through code-behind.
When I add a new row, If I click the enter key on a column that is text everything is ok and the row is added to the grid.
But If I click the enter key on a column that is a BoundCheckBoxColumn, nothing happens.
In the example that I've attached I'm trying to add a new row "tst 4".
If I click on the column "Motivo" and press enter key the row is added to my grid. But If I click the column "Activo" and press the enter key nothing happens.
What can I do?
Thank you
Hello soniaalves ,
Thank you for posting in our forum.
While the BoundCheckBoxField doesn’t have editing mode it should add the row on enter key down provided you have the Activation behavior enabled so that the cell from the adding row has taken the focus when you click on the checkbox image.
I’ve tested this scenario using the version 12.1.20121.2178 of 12.1 with Activation behavior enabled and have tested it against IE10, Chrome 25, Firefox 19.0.2.
Please refer to the attached sample and let me know if I’m missing anything from your scenario or if you’re using an older service release version of 12.1 .
I’m looking forward to your reply.
Best Regards,
Maya Kirova
Developer Support Engineer II
Infragistics, Inc.
http://es.infragistics.com/support
I've set activation behaviour enabled=true and tried again. But the row is not added, it remains the same as I described previously.
<ig:RowAdding Enabled="true" Alignment="Top" EditModeActions-MouseClick="Single"></ig:RowAdding>
<ig:CellEditing Enabled="true" EditModeActions-MouseClick="Single"></ig:CellEditing>
<ig:Sorting SortingMode="Single" Enabled="true"></ig:Sorting>
<ig:Filtering FilteringClientEvents-FilterDropdownDisplayed="WDGTrans" Alignment="Top" Visibility="Visible" Enabled="true" AnimationEnabled="false" />
<ig:ColumnResizing Enabled="true">
<ColumnSettings>
<ig:ColumnResizeSetting EnableResize="true" />
</ColumnSettings>
</ig:ColumnResizing>
<ig:Activation Enabled="true"></ig:Activation>
I tried with the following versions:12.1.20121.2048 and
12.2.20122.2054
I tested it on IE9, framework 3.5
With activation enabled, when I press key down, the focus goes to the cell below. Please see the attached image. Am I missing something from your answer or should I upgrade my Infragistics version?
Please refer to the attached sample. Based on it I tried the following:
1)Selected cell with the checkbox.
2) Hit enter key.
The result I see in IE9 is that the row is added to the grid.
I’ve tested this with version 12.1.20121.2054.
Could you test this on your side and let me know if you’re getting a different result or if I’m missing anything from your scenario.
I've tested your scenario.
When the grid loads for the first time, by default I got the value 9999 on the first column, I click the checkbox to unselect it, then press enter key and everything works fine. The row is correctly added.
Now let's imagine that I want to add the a number and I want my checkbox to be unselected. Please consider these two examples below that I've tested and their behaviours:
1. I typed the value 123 in the first column, then with the tab key the second column gains focus, I click the checkbox to unselect it, I press enter key and the row is added.
The problem is when I try it this way:
2. I typed the value 122 in the first column, then with the mouse I click the checbox of second column, the checkbox gets unchecked but I when I press enter key nothing happens, because it didn't got the focus. To get the focus, I have to do this:
2.1) Type value 122 in the first column2.2) Click the checbox with mouse, it gets unchecked but the cell doesn't gain the focus2.3) Click again the checkbox, it gets checked and NOW the cell gain the focus2.4) Click again the checbox, it gets unchecked and the cell still has the focus2.5) Press enter key and the row is added
The only way to avoid it is: at point 2.2) after clicking the checkbox the first time with the mouse, I also have to click the column too so it gains the focus, then I press enter key and the row is added. In this case, I think that it should get the focus the first time I click the checkbox with the mouse, just like when I do the same with the tab key.
Thanks for the example you provided.
That's it!
Thanks for helping and for providing samples!
It seems ok now.
It seems that this occurs only when you change the value of the checkbox before you exit edit mode of the previous cell you’re editing.
It seems that in that case the focus doesn’t move the checkbox.
You could work around that by handling the CellValueChanging event and check if the value has been changed in the checkbox column.
If that’s the case you can set the current active cell to be that checkbox cell. For example:
function wdg_valueChanging(sender, e) {
if (e.get_cell().get_column().get_key() == "boundCheckbox") {
var activation = sender.get_behaviors().get_activation();
activation.set_activeCell(e.get_cell(), true);
}
Then in each scenario where you change a value in the checkbox column the focus will be set on that cell.
Please refer to the attached sample and let me know of this