Hi
I have a RadComboBox (EnableLoadOnDemand is True) and 3 numeric boxes in Edit Template in a RadGrid.
What I am trying to do is when a user selects a option in the RadComboBox then it populates the Textboxes via its attributes.
I have the following javascript which I have used to do this previously but not in a Grid
function rcb_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");
var rtxtLongDegree = $find("<%=rtxtLongDegree.ClientID %>");
rtxtLongDegree.set_value(Longitude_Deg);
}
<telerik:RadComboBox ID="rcbPortList" runat="server" AllowCustomText="false" DropDownWidth="590px"
EmptyMessage=" - Select a port - " EnableLoadOnDemand="True" Height="150px" HighlightTemplatedItems="true"
MarkFirstMatch="True" Width="170px" OnClientSelectedIndexChanged="rcb_Changed"
ShowMoreResultsBox="True" EnableVirtualScrolling="True">
I have tried chaging "<%=rtxtLongDegree.ClientID %>" to the name of the Textbox in the Grid Edit Template but I get an error saying it cannot find the control.
How do I do this is so when I change the ComboxBox in the Grid it populates the textboxes,,... Using Javascript.
Thanks in advance
I have a RadComboBox (EnableLoadOnDemand is True) and 3 numeric boxes in Edit Template in a RadGrid.
What I am trying to do is when a user selects a option in the RadComboBox then it populates the Textboxes via its attributes.
I have the following javascript which I have used to do this previously but not in a Grid
function rcb_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");
var rtxtLongDegree = $find("<%=rtxtLongDegree.ClientID %>");
rtxtLongDegree.set_value(Longitude_Deg);
}
<telerik:RadComboBox ID="rcbPortList" runat="server" AllowCustomText="false" DropDownWidth="590px"
EmptyMessage=" - Select a port - " EnableLoadOnDemand="True" Height="150px" HighlightTemplatedItems="true"
MarkFirstMatch="True" Width="170px" OnClientSelectedIndexChanged="rcb_Changed"
ShowMoreResultsBox="True" EnableVirtualScrolling="True">
I have tried chaging "<%=rtxtLongDegree.ClientID %>" to the name of the Textbox in the Grid Edit Template but I get an error saying it cannot find the control.
How do I do this is so when I change the ComboxBox in the Grid it populates the textboxes,,... Using Javascript.
Thanks in advance