jQWidgets Forums

jQuery UI Widgets Forums Grid grid

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 12 years ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    grid Posts
  • grid #16663

    sudarshan
    Member

    hi ,
    how to display the grid value into the text field when double clicking the grid row? where my grid is in the dialog box and that text field also in the same dialog box.

    grid #16674

    Peter Stoev
    Keymaster

    Hi sudarshan,

    $("#jqxgrid").on("cellclick", function (event) {
    var column = event.args.column;
    var rowindex = event.args.rowindex;
    var columnindex = event.args.columnindex;
    });

    The above get’s the clicked cell.

    You can then use the “getcellvalue” method to get the cell’s value.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    grid #16778

    sudarshan
    Member

    Thanks peter ,
    i use
    $(“#admission_grid”).on(“click”, function () {

    var selectedrowindex = $(“#admission_grid”).jqxGrid(‘getselectedrowindex’);
    var rowscount = $(“#admission_grid”).jqxGrid(‘getdatainformation’).rowscount;
    var data=$(“#admission_grid”).jqxGrid(‘getrows’)[selectedrowindex];
    $(‘#f_name’).val(data.student_fname);
    $(‘#lastName’).val(data.student_lname);
    $(‘#grade’).val(data.student_grade);
    $(‘#rollNo’).val(data.student_rollno);
    $(‘#student_id’).val(data.student_id);
    });
    it also display the value ,is this right? & i am confuse in the getcellvalue please tell me about this.

    grid #16781

    Peter Stoev
    Keymaster

    Hi sudarshan,

    Example:

    var value = $("grid").jqxGrid('getcellvalue', 0, 'firstname');

    0 in the above code is the row’s index.
    “firstname” is the column’s datafield.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.