Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
430
How to get hidden column value in igGrid
posted

Hi Team,

I have a requirement in which I want to hide some columns.When user double clicks on a particular row want to retrieve hidden column value and based on that I want to show another grid.

I have tried the below approach.

$("#igGrid").dblclick(function (event) {
// row html element
debugger
var row = $(event.target).closest('tr');
var strMemberCode = row.find('td:eq(0)').text();
var strFirstName = row.find('td:eq(1)').text();
var strLastName = row.find('td:eq(4)').text();
var strSSN = row.find('td:eq(5)').text();

var gridrow = $("#singleGrid").igGrid("selectedRow");
var dataview = $(documentGridName).data('igGrid').dataSource.dataView();
var cellValue = dataview[row.index]["DocumentID"];

}

I was not able to retrieve hidden column.

Please let me know ur suggestions and reply ASAP.

Regards,

Pradeep SE

Parents
No Data
Reply
  • 17590
    Offline posted

    Hello Pradeep,

    Thank you for posting in our community.

    What I can suggest for achieving your requirement is handling double click event for igGrid rows. In this event the index of the clicked row could be retrieved. Afterwards, using this index the hidden column value could be accessed from the underlying data source via index. For example:

    ("#grid tr").dblclick(function (event) {
      var rowIndex = $(this).index(),
       dataSource = $("#grid").igGrid("option", "dataSource"),
       cellValue;

    //get hidden cell value
       cellValue = dataSource[index].ProductNumber;
     
     );

    I also created a small sample illustrating my suggestion for your reference. In my sample I am handling double click event for grid rows. Using the row index I am accessing hidden cell value and showing it in an alert.

    Please test this sample on your side and let me know whether it helps you achieve your requirement.

    Do not hesitate to contact me if you need any further assistance with this matter.

    igGridRetrieveHideenCellvalues.zip
Children