Author Topic: not getting cell value  (Read 6299 times)

kavyasetty

  • Newbie
  • *
  • Posts: 25
    • View Profile
not getting cell value
« on: December 17, 2013, 05:41:21 pm »
hi,

I am using getcell method and passing the row & col index. when i try to alert the result it shows Object object. But i need the value inside the cell . is it possible to get the value ??
i have tried .val() , it dint work.

kavyasetty

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: not getting cell value
« Reply #1 on: December 18, 2013, 10:08:09 am »
please help

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6265
    • View Profile
Re: not getting cell value
« Reply #2 on: December 18, 2013, 10:56:02 am »
use .text() rather than .val()

kavyasetty

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: not getting cell value
« Reply #3 on: December 18, 2013, 11:06:31 am »
i used .text() it is just popping empty when i alert rather than the text inside the cell.

 var obj=$( "#fragment-5" ).pqGrid( "getCell", {rowIndx: rowNo,colIndx:1} );      
                alert(obj.text())

this is giving me a empty alert box

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6265
    • View Profile
Re: not getting cell value
« Reply #4 on: December 18, 2013, 11:21:20 am »

kavyasetty

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: not getting cell value
« Reply #5 on: December 18, 2013, 01:00:56 pm »
thanks  :) it worked.

if i add dataIndx to colModel i see data missing in that columns with data indx
for ex:{title:"*EMPLOYEE ID",width:100,editable: false,dataIndx:"empid"}

in the grid the employee id column no cells have value.. all the cells in this column are empty.

if i remove the dataindx it is working fine that the cells in the columns are having data
« Last Edit: December 18, 2013, 01:03:44 pm by kavyasetty »