Results 1 to 3 of 3

Thread: Change Combo Box Value

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Seattle
    Posts
    954

    Change Combo Box Value

    Hi,

    I would like to click a checkbox in a datagrid and change a value in a combo box, via client side script. I am already highlighting the row's color. Here is the code for that:

    Code:
    		<script language="javascript">	
    		 function HighlightRow(chkB)    
    		 {
    	        var xState=chkB.checked;
    		    if(xState)
    		    {
    		    chkB.parentElement.parentElement.style.backgroundColor='red';
    			chkB.parentElement.parentElement.style.color='white';
    			}
    			else 
    			{
    			chkB.parentElement.parentElement.style.backgroundColor='#FFF7E7'; 
    			chkB.parentElement.parentElement.style.color='black'; 
    			}
    		}
    		</script>
    
    												<ItemTemplate>
    													<asp:CheckBox ID="cOwn" Runat="server" AutoPostBack="False" onclick="javascript:HighlightRow(this);"></asp:CheckBox>
    												</ItemTemplate>

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Seattle
    Posts
    954
    Anyone?

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Seattle
    Posts
    954
    Any thoughts?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width