Hi
I am trying to write some code which will loop through a RadGrid and find any RadNumericTextBox in the dit template.
The code below works for the first row in the grid but no any others. Any ideas?
Thanks in advance
function ConvertToDegreeMinutesSeconds_Grid(Longitude, Latitude) {
var rgrdRouteWayPoints = $find("<%=rgrdRouteWayPoints.ClientID %>");
if (rgrdRouteWayPoints) {
var MasterTable = rgrdRouteWayPoints.get_masterTableView();
var Rows = MasterTable.get_dataItems();
for (var i = 0; i < Rows.length; i++) {
var row = Rows[i];
var rtxtLongDegree_Grid = row.findControl("rtxtLongDegree_Grid");
var rtxtLongMin_Grid = row.findControl("rtxtLongMin_Grid");
var rtxtLongSec_Grid = row.findControl("rtxtLongSec_Grid");
var rtxtLatDegree_Grid = row.findControl("rtxtLatDegree_Grid");
var rtxtLatMin_Grid = row.findControl("rtxtLatMin_Grid");
var rtxtLatSec_Grid = row.findControl("rtxtLatSec_Grid");
rtxtLongDegree_Grid.set_value(Longitude_Deg);
rtxtLongMin_Grid.set_value(Longitude_Min);
rtxtLongSec_Grid.set_value(Longitude_Sec);
rtxtLatDegree_Grid.set_value(Latitude_Deg);
rtxtLatMin_Grid.set_value(Latitude_Min);
rtxtLatSec_Grid.set_value(Latitude_Sec);
}
}
}
function rcbPortList_Grid_Changed(sender, args) {
//copy port long/lat to input boxes
var item = args.get_item();
var Longitude = item.get_attributes().getAttribute("Longitude");
var Latitude = item.get_attributes().getAttribute("Latitude");
ConvertToDegreeMinutesSeconds_Grid(Longitude, Latitude);
}
I am trying to write some code which will loop through a RadGrid and find any RadNumericTextBox in the dit template.
The code below works for the first row in the grid but no any others. Any ideas?
Thanks in advance
function ConvertToDegreeMinutesSeconds_Grid(Longitude, Latitude) {
var rgrdRouteWayPoints = $find("<%=rgrdRouteWayPoints.ClientID %>");
if (rgrdRouteWayPoints) {
var MasterTable = rgrdRouteWayPoints.get_masterTableView();
var Rows = MasterTable.get_dataItems();
for (var i = 0; i < Rows.length; i++) {
var row = Rows[i];
var rtxtLongDegree_Grid = row.findControl("rtxtLongDegree_Grid");
var rtxtLongMin_Grid = row.findControl("rtxtLongMin_Grid");
var rtxtLongSec_Grid = row.findControl("rtxtLongSec_Grid");
var rtxtLatDegree_Grid = row.findControl("rtxtLatDegree_Grid");
var rtxtLatMin_Grid = row.findControl("rtxtLatMin_Grid");
var rtxtLatSec_Grid = row.findControl("rtxtLatSec_Grid");
rtxtLongDegree_Grid.set_value(Longitude_Deg);
rtxtLongMin_Grid.set_value(Longitude_Min);
rtxtLongSec_Grid.set_value(Longitude_Sec);
rtxtLatDegree_Grid.set_value(Latitude_Deg);
rtxtLatMin_Grid.set_value(Latitude_Min);
rtxtLatSec_Grid.set_value(Latitude_Sec);
}
}
}
function rcbPortList_Grid_Changed(sender, args) {
//copy port long/lat to input boxes
var item = args.get_item();
var Longitude = item.get_attributes().getAttribute("Longitude");
var Latitude = item.get_attributes().getAttribute("Latitude");
ConvertToDegreeMinutesSeconds_Grid(Longitude, Latitude);
}