jQWidgets Forums

jQuery UI Widgets Forums Grid Grid focus on Double click

This topic contains 5 replies, has 2 voices, and was last updated by  Peter Stoev 10 years, 10 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • Grid focus on Double click #55484

    Akshar AK
    Participant

    Hello,
    I am using a JQxGrid and the properties am using are as follows.

    $(gridName).jqxGrid({
      			width: gridWidth,
      		//	autoheight : true,
      			height : 395,
     			source : dataAdapter,
     			verticalscrollbarlargestep: 50,
     			theme : 'theme',
     			editable : true,
     			rowsheight:22,
     			showstatusbar : true,
     			showfiltercolumnbackground: true,
     			showfilterrow: true,
                filterable: true,
                showaggregates : true,
                columnsresize:true, 
     			selectionmode : 'multiplecellsadvanced',
     			columns :gridColumns ,
     			handlekeyboardnavigation: function (event) {
                    var rowindex = $("#"+location+"Grid").jqxGrid('getselectedcell');
                    var key = event.charCode ? event.charCode : event.keyCode ? event.keyCode : 0;
                    if (key == 46) 
                    {
                        if(rowindex.datafield=="strJobCodeId"
                               || rowindex.datafield=="strActivityCode"
                               || rowindex.datafield=="strTotalApprovedAndCR"
                               || rowindex.datafield=="strEAC"
                               || rowindex.datafield=="strCRPastApprovals"
                               || rowindex.datafield=="strSurplusOrDeficit"
                               || rowindex.datafield=="strTotalFTE"
                               || rowindex.datafield=="strTotalCost")
                        {
                                      return true;
                        }
                        else
                         {
                               for(var i=0; i< pastActualColumns.length; i++)
                                      {
                                             if(pastActualColumns[i] == rowindex.datafield)
                                                    return true;
                               }
                         }
                    }}
     			
     					
     		});

    The problem is when I double click on the cell, the values inside the grid is getting focused. Now if I simply move the mouse around, where ever the cursor is moved the cells are getting selected. Is this normal in JQWidgets? or some property to disable this?

    Thanks in advance

    Grid focus on Double click #55496

    Peter Stoev
    Keymaster

    Hi Akshar AK,

    That seems to be the default behavior in this selection mode. The selection happens on Click and Drag.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Grid focus on Double click #55499

    Akshar AK
    Participant

    Hello peter,
    If I click and drag all the cells will be selected. The thing is when I double click on a cell, the values inside are getting selected. I just do a double click and move my mouse. but when I do a double click, the value inside the cell is getting selected for me to change it, on those change am updating few columns of the same row, before the change has happened if I move the cursor, where ever I drag the cursors, the cells are getting selected. Its like click and drag. But am not dragging, just moving the mouse.

    Grid focus on Double click #55503

    Peter Stoev
    Keymaster

    Hi Akshar AK,

    Yes, when you double click, the cell’s value should be on focus i.e it should be selected.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Grid focus on Double click #55508

    Akshar AK
    Participant

    but after tat if I move the mouse why will all the cells on which the mouse move be selected?

    Grid focus on Double click #55509

    Peter Stoev
    Keymaster

    Hi Akshar AK,

    Probably, because you use an old version of the library. The described behavior by you is not the same as in this demo: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/defaultfunctionality.htm?arctic which has the same selection mode and the Grid is editable.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.