In my RadTreeList I have two data columns displayed. The first column is a number and the second column is a percent. On the client side I wish to update the percent value when the number changes; and when the percent changes I wish to update the number. Both columns are defined as TreeListNumericColumns and are configured to use a RadNumericTextBox. I have attached OnValueChanged events to both columns.
Using JavaScript if the number changes I can determine the new number, but I do not know how to get a reference to the percent column so I can update the percent. I know how to get a reference to the item containing the numeric column updated and I can get a reference to the table cell containing the percent RadNumericTextBox but I need a reference to the RadNumericTextBox which is in the innerHTML so that I can update the Percent..
Here is my Javascript code for the OnValueChangedEvent when the number changes. This all works but I cannot figure out how to get a reference to the RadNumericTextBox containing the percent so I can update the value displayed on the client.
I am using Telerik version 2013.1.417.40
Any help would be appreciated.
Thanks,
Chris J.
.
Using JavaScript if the number changes I can determine the new number, but I do not know how to get a reference to the percent column so I can update the percent. I know how to get a reference to the item containing the numeric column updated and I can get a reference to the table cell containing the percent RadNumericTextBox but I need a reference to the RadNumericTextBox which is in the innerHTML so that I can update the Percent..
Here is my Javascript code for the OnValueChangedEvent when the number changes. This all works but I cannot figure out how to get a reference to the RadNumericTextBox containing the percent so I can update the value displayed on the client.
function
NumberValueChanged(sender, eventArgs) {
var
treelist = $find(
'<%=rtvProducts.ClientID %>'
);
var
numericTextBox = sender.get_element();
var
item = treelist.getContainerItem(numericTextBox);
var
index = item.get_displayIndex();
var
column = treelist.getColumnByUniqueName(
'Percent'
);
var
colname = column.get_uniqueName();
var
cell = treelist.getCellByColumnUniqueName(item, colname);
alert(cell.innerHTML);
return
;
}
Any help would be appreciated.
Thanks,
Chris J.
.