jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Columns reorder and cell editing
Tagged: columnsreorder, editing, grid
This topic contains 10 replies, has 2 voices, and was last updated by alexz 12 years, 1 month ago.
-
Author
-
Hi,
I noticed an interesting problem, when you have columnsreorder enabled, you can navigate inside cell only by keyboard arrows. Click changes the cell to editing mode as it should, but subsequent clicks do not put cursor to desired position inside the cell.
<script type="text/javascript"> $(document).ready(function () { var gridJsonData = [{ "Id": "1", "Name": "Alfreds Futterkiste"}]; // prepare the data var source = { datatype: "json", localdata: gridJsonData, datafields: [{ name: 'Id', type:'int' } ,{name: 'Name', type:'string', odatatype:'String' } ,{name: 'StatusName', type:'string', odatatype:'String' }] }; var dataAdapter = new $.jqx.dataAdapter(source);$('#jqxAjaxGridRoute').jqxGrid({source:dataAdapter, editable: true// THIS IS THE PROBLEM,columnsreorder:true,selectionmode:'singlecell',editmode:'dblclick',width:'100%',columns:[{datafield: 'Id',draggable: false,filterable: false,sortable: false,menu: false,width: '3%'},{editable: true,text: 'Nimi',datafield: 'Name'}]});});</script><div id="jqxAjaxGridRoute"></div>
Hi alexz,
1. We are unable to reproduce the reported behavior. After reordering the columns, the cells editing and navigation works as expected.
2. jqxGrid columns do not have a property called “odatatype”.Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comThanks Peter, odatatype is just for my own purposes, it does not affect the behavior. I have the latest version of jqx (2.7.0 and 1.8.2 jquery)
Can you send me working sample by email?
All the best,
AlexHi Alex,
The test is done using the Editing sample: cellediting.htm. I added columns resorder to the sample, reordered a column and the input, mouse + kb navigation were correct.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comThanks Peter, the only difference seems to be single click edit, when I have double click (dblclick)?
Hi alexz,
The “editmode” does not matter. In doubleclick mode you will just have to click 2 times to begin or end editing.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
now I’ve tried to set cell edition params like in your solution and it still does not work. When I open your sample there’s no columns reorder by drag and drop. Are you sure you added it there? I tried with latest IE and Firefox with no results.
All the Best,
AlexHi alexz,
Please, re-read my post – ” I added columns reorder to the sample, reordered a column and the input, mouse + kb navigation were correct.”.
This means that I added columns reorder by setting the “columnsreorder” property to true and included jqxgrid.columnsreorder.js in the sample, too. I also changed the editmode to “doubleclick”.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comOk, thanks, I just thought you made the changes to online sample.
Now I’ve downloaded the sample and make the changes you mention in your post. It has the same problem. The test sequence goes like this:
Click (or doubleclick) any text cell
Cells editor opens
Observe that the cells value is entirely selected
If now you click on the beginning or anywhere in the middle of the word nothing happens
If you use keyboard right left arrows, cursor moves to the desired positionI’ve noticed that your sample uses the same jqx version 2.7 that I use.
Hope this helps, ask me if you still unable to reproduce.
All the best,
AlexHi Alex,
With the latest information, I confirm the focus selection issue with FF when columnsreorder is true. It works fine with Chrome, IE, Safari and Opera.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comThanks Peter, sorry I was not precise enough, now I tried more with IE and it works, but not in FF as you said.
All the best,
Alex -
AuthorPosts
You must be logged in to reply to this topic.