Skip to content

Infragistics Community Forum / Web / Ignite UI for jQuery / Get cell value of selected row in IgGRID and how to iterate to selected row parents and also get their cell value.

Get cell value of selected row in IgGRID and how to iterate to selected row parents and also get their cell value.

New Discussion
N S
N S asked on Jul 10, 2014 3:21 PM

Code:
car rows = $(“#grid1”).igGridSelection(“selectedRows”);
$.each(rows, function (ix, el) {
//TODO
1)How do i get row cells value.For exampe if row contain three columns.how do i get the column no 2 value.
2)Secondly i need to iterate to parents of selected row and get the same like parent row column no 2 value.
});
How do i accomaplish this task.

Sign In to post a reply

Replies

  • 0
    Martin Pavlov
    Martin Pavlov answered on Mar 28, 2013 8:53 AM

    Hello N S,

    Thank you for posting in the community.

    You can get the cell value by using igGrid.getCellValue  or igGrid.getCellText API methods.
    Attached you can find sample which demonstrates getting a selected row cell value.
    I wanted to ask you what you meant by parent rows? igGrid has flat structure and there is no parent row of the selected row. Are you referring to igHierarchicalGrid?

    Best regards,
    Martin Pavlov
    Infragistics, Inc.
    support@infragistics.com

    • 0
      N S
      N S answered on Mar 28, 2013 9:01 AM

      Yes i am referrning to igHierarchicalGrid for iteranation of rows upto its parent.These two can also work with "igGrid.getCellValue or igGrid.getCellText " with igHierarchicalGrid .Thanks for reply.

      • 0
        Martin Pavlov
        Martin Pavlov answered on Mar 28, 2013 10:25 AM

        Hello N S,

        Attached you can find sample which demonstrates how to get selected cell of a child grid as well as a cell from its parent row.

        Do not hesitate to  ask if you have any additional questions.

        Best regards,
        Martin Pavlov
        Infragistics, Inc.
        support@infragistics.com

      • 0
        Min Zhao
        Min Zhao answered on Mar 12, 2014 4:39 PM

        Can you re-post the sample code? I downloaded the zip file, but only see a HTML file in the zip file.

        Min Zhao

    • 0
      Charudatta JAwale
      Charudatta JAwale answered on Jul 10, 2014 3:21 PM

      Hi,

      I have simple IgGrid from Ignit UI.

      I am using below event when click on selected row of the grid to display details information.

      $("#grid").on("iggridselectionactiverowchanged", function (evt, ui) {

       var message = "Selected Row Clicked";

      alert(message + ":——" + value.value);

      });

      Now How do I read the particular column values of the selected row?

      Please help.

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
N S
Favorites
0
Replies
5
Created On
Jul 10, 2014
Last Post
11 years, 7 months ago

Suggested Discussions

Created by

N S

Created on

Jul 10, 2014 3:21 PM

Last activity on

Feb 24, 2026 9:18 AM