I need to get an ID for a selected row based on the row being double clicked. I already have the event firing, I just need the way to access the grid data:
$(document).ready(function () { $('#InstrumentListGrid').delegate('.ui-iggrid-activerow', 'dblclick', function (e, args) { get the ID from the grid somehow
var url = "@Url.Action("Edit", new { id = id })"; window.location = url; }); });
How can do this?
Worked it out myself:
$(document).ready(function () { $('#InstrumentListGrid').delegate('.ui-iggrid-activerow', 'dblclick', function (e) { var row = $('#InstrumentListGrid').igGridSelection('selectedRow'); var dataview = $('#InstrumentListGrid').data('igGrid').dataSource.dataView(); var cellValue = dataview[row.index]["ID"]; var address = "@Url.Action("Edit")" + "/" + cellValue; window.location = address; }); })
Hello Dane,
I am following up to see if this matter is resolved.
Please let me know if I may be of further assistance with this matter.
Sincerely,Mike P.Developer Support EngineerInfragistics, Inc.www.infragistics.com
Consider it resolved unless you can provide a better answer Mike! :)
Dane.