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
20
How to get the RowId in ClickEvent (Webgrid)
posted

i am firing an automatic click event in infragistics webgrid by placing a button in first column of  a grid

unable to get the rowid by using the below function (But i need the same function as much as possible) Suggest me solution for the below issue (head is cracking for nearly 4 hrs)

function igtbl_colButtonClick(e, objID){
            //var grid = igtbl_getGridById("<%= UltrawebGrid1.ClientID %>");
            var grid   = igtbl_getGridById(objID).Rows;
            var id = grid.Rows;
            if (grid !=null){
            var row = grid.Rows.getRow(2);
              var Value=row.getCell(2).getValue();
              if ( (window.opener) && (window.opener.PopUpHandler) )
                  {
                window.opener.PopUpHandler(Value);
                window.close();
                }
              }
    }

 

  • 820
    posted

    sample code to get the cell values and grid :-

    function igtbl_colButtonClick(gridID, cellID)

     

     

     

     

    {

    var grid = igtbl_getGridById(gridID);

    var gridCell = igtbl_getCellById(cellID).getValue();

     

     

     

    var activeRow = igtbl_getActiveRow(gridID);

    var value = activeRow.getCellFromKey(

    "columnKey").getValue();

    }