I have a template column in a RadGrid that has a RadMaskedTextBox in it.
When the user selects a row, the entire row is changed color except for these RadMaskedTextBoxes.
I want to change their background color to red when the user selects the row.
I trigger an event to do this with the following in the ClientSettings section of the RadGrid HTML.
When the user selects a row, the entire row is changed color except for these RadMaskedTextBoxes.
I want to change their background color to red when the user selects the row.
I trigger an event to do this with the following in the ClientSettings section of the RadGrid HTML.
<
ClientEvents
OnRowSelected
=
"OnRowSelected"
/>
The javascript event handler is:
function OnRowSelected(sender, eventArgs) {
var MasterTable;
var aryAllRows;
var rowOneRow;
var txtItemUPC;
MasterTable = sender.get_masterTableView();
aryAllRows = MasterTable.get_dataItems();
rowOneRow = aryAllRows[eventArgs.get_itemIndexHierarchical()];
txtItemUPC = rowOneRow.findControl('txtItemUPC');
txtItemUPC.get_styles().EnabledStyle[0] += "background-color: Red";
}
I can check txtItemUPC.get_value() to see that txtItemUPC is correctly set to the RadMaskedTextBox.
The value of txtItemUPC.get_styles().EnabledStyle[0] is changed by the above code. However, the RadMaskedTextBox doesn't display any differently.
As a test, I set txtItemUPC.get_styles().EnabledStyle[0] to a garbage value and not receive any error messages.
Can you point out what I am doing wrong? Note that there is no set_styles option, I believe.