Hi everyone, I've been struggling with this issue and would appreciate any help or advice you can offer. I've spent the last day and a half trying to figure it out!
I'm working on a module for a DotNetNuke portal where I need to populate a Telerik RadGrid with data. Despite following numerous tutorials and examples, I keep getting errors like "object Object", "null", or "undefined".
Specifically, I am looking to: 1) Retrieve the value of the "BookingID" column for each selected row 2) Pass that value as part of a URL string that will open in a RadWindow.
I've been attempting to achieve this using JavaScript, but I'm open to any other suggestions at this point. Below is the current JavaScript code along with a simplified version of the RadGrid:
///JavaScript///
function gup(name) {
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regexS = "[\\?&]" + name + "=([^&]*)";
var regex = new RegExp(regexS);
var results = regex.exec(window.location.href);
if (results == null) return "";
else return results[1];
}
function ShowEditForm() {
var tab = gup('tabid')
var mid = gup('mid').replace(/#/, '')
var masterTableView = $find("perDiemBookingsRadGrid").get_masterTableView();
var id = masterTableView.get_selectedItems()[0].getDataKeyValue('BookingID');
window.radopen("/Default.aspx?tabid=" + tab + "&ctl=multiEdit&mid=" + mid + "&SkinSrc=[G]Skins/Blue-NCPP/Plain&BIDs=" + id, "RadWindow3");
}