Change row color
-
All: I have a set of 20 questions with 5 point scale for each question. questions and scales are retrieved dynamically from database. Is there a way to change row color as soon as user clicks on one the scales as answer? I defined a table in my aspx page and dynamically populating the rows in code-behind-file page. Many thanks.
-
All: I have a set of 20 questions with 5 point scale for each question. questions and scales are retrieved dynamically from database. Is there a way to change row color as soon as user clicks on one the scales as answer? I defined a table in my aspx page and dynamically populating the rows in code-behind-file page. Many thanks.
It would be easyer to anser if you had added some code. But lets say that it is a RaidoButton the user clicks on, then you could do something like this: private void rbTheRadioButton_CheckedChanged(object sender, System.EventArgs e) { if(rbTheRadioButton.Checked) { HtmlTableRow tr = (HtmlTableRow)rbTheRadioButton.parent.parent; tr.BgColor = Color.Blue; } } Haven't tryed it out, but I think this will do the trick Hope it helps Thomas
-
It would be easyer to anser if you had added some code. But lets say that it is a RaidoButton the user clicks on, then you could do something like this: private void rbTheRadioButton_CheckedChanged(object sender, System.EventArgs e) { if(rbTheRadioButton.Checked) { HtmlTableRow tr = (HtmlTableRow)rbTheRadioButton.parent.parent; tr.BgColor = Color.Blue; } } Haven't tryed it out, but I think this will do the trick Hope it helps Thomas