I have added templates at runtime to my menu and that works fine.
The template includes a RadTextBox that I want to do a postback on TextChanged.
in the InstantiateIn function I have
This works the first time it is called. Subsequent changes to the text cause a postback, but it does not seem that the TextChanged function is called.
The backcolor of the RadTextBox starts as white, turns red on a postback and doesn't change again when I change the text more.
I'm pretty lost on what to try to get the text changed to call properly more than the first time. Any pointers would be greatly appreciated.
The template includes a RadTextBox that I want to do a postback on TextChanged.
in the InstantiateIn function I have
radTextBox.TextChanged += new EventHandler(radTextBox_TextChanged); |
void radTextBox_TextChanged(object sender, EventArgs e) |
{ |
RadTextBox target = (RadTextBox)sender; |
if (target.BackColor == System.Drawing.Color.Red || target.BackColor == System.Drawing.Color.Green) |
{ |
target.BackColor = System.Drawing.Color.Green; |
} |
else |
{ |
target.BackColor = System.Drawing.Color.Red; |
} |
} |
I'm pretty lost on what to try to get the text changed to call properly more than the first time. Any pointers would be greatly appreciated.