Author Topic: GET DATA ON ROW  (Read 3042 times)

soulminato

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 7
    • View Profile
GET DATA ON ROW
« on: September 02, 2015, 03:23:46 am »
Hi, how are you. How I can get the data in a row when I crush the enter key above a row?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6265
    • View Profile
Re: GET DATA ON ROW
« Reply #1 on: September 03, 2015, 10:14:01 am »
Sorry for the confusion. your account has been upgraded.

Data in a row can be obtained if you know the index ( rowIndx ) or record ID of the row.

var rowData = $grid.pqGrid("getRowData", { rowIndx: rowIndx } );


If you need rowData inside a row or cell based event, you can directly get it from ui arguments in the callback function.

cellKeyDown: function(evt, ui){
            if(evt.keyCode == $.ui.keyCode.ENTER){
               alert(ui.rowData);
            }
         },

http://paramquery.com/pro/api#event-cellKeyDown
« Last Edit: September 03, 2015, 12:16:57 pm by paramquery »

soulminato

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: GET DATA ON ROW
« Reply #2 on: September 04, 2015, 07:20:55 am »
ownership 'SelectionModel' table is 'row' and not use the 'cell' and there is some method or event that is similar to cellkeydown? for example rowkeydown?

For now I'm using the event rowDblClick, for passing data from one table to another, but i need press ENTER key for passing the data, thanks,

Sorry for my bad english, I speak spanish. :P

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6265
    • View Profile
Re: GET DATA ON ROW
« Reply #3 on: September 04, 2015, 09:35:34 pm »
yes there is rowKeyDown event that can be used when selectionModel.type is 'row'

http://jsfiddle.net/vx2yvLfd/

soulminato

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: GET DATA ON ROW
« Reply #4 on: September 05, 2015, 02:42:44 am »
Ahhhh... thanks, That event It's not in the documentation.