.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
SP
satyapriyanayak
Subhransu Sekhar Jena
abhays
DotnetUser
Post New Web Links

Change selected row background color in gridview using javascript

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :ASP.Net
 

hi frineds,

              i have a gridview with radio buttons in gridview i have chance to select only one item at a time in gridview like this

i need to change the row color of selected item in gridview with radio button using javascript if i select second row with radio button first row comes to normal condition now second row is in selected mode please help to write this functionality using javascript




View Complete Post


More Related Resource Links

Selected to change the background color of the page

  

Hi,

As this site, http://www.borfin.com.tr/genel/Default.aspx, How can I change the background color selected pages.


how do i use javascript to change values of controls inside a gridview

  
i have 2 labels (lblRate,lblTotal) and a textbox (txtQuantity) in a itemtemplate of a gridview.I want to calculate the products of rate and quantity and show it in Total as the textbox loses focus...i cant use textchanged because i dont want the page to postback.How do i use javascript to achieve this??Please Help Urgently....<asp:TemplateField HeaderText="Rate">                <ItemTemplate>                    <asp:Label ID="lblRate" runat="server" Text='<%# Eval("Rate") %>' />                </ItemTemplate>            </asp:TemplateField> <asp:TemplateField HeaderText="Quantity">                <ItemTemplate>                    <asp:TextBox ID="txtQty" runat="server" />                </ItemTemplate>&

Trap Selected Index change event of listbox using Javascript.

  
Hi All, This is reagarding listbox selection. I have a list box with multi select option. I want to trap the selected index change event of Listbox through javascript. Item of list box can be selected using Click of mouse and also the keyboard up down key with shift. I tried onclick event to bind the javascript function. It works fine if I select by mouse, but it doesen't work for up/down key of keyboard. Thanks, Naveen

change TD background/foreground color problem.

  
I have some javascript that is suppose to change the color of a table TD. the CSS file has an entry like this .tdcommand {} HTML TD is like <td colspan="2" height="162" valign="top" class="tdcommand"> if i put a background-color:red or whatever in the CSS file, the color is shown correctly. If i change it via a script it doesnt seem to have any impact. using the alert() to post info, i've found its entering my function correctly and getting the correct info. the important part of the function is thisfor (var i = 0; i < document.styleSheets[0][CSSRules].length; i++) { if (document.styleSheets[0][CSSRules][i].selectorText == obj) { document.styleSheets[0][CSSRules][i].style[prop] = color document.getElementById("opt_" + option).innerHTML = "'" + color + "'" } }   as i said, using the alert() i can validate that its finding the class ok (obj = .tdcommand) and the property is correct (background-color) and the innerHTML update is working fine. I use this same function to set other things, such as text color and highlighting of span's without any problem. what am i missing?   Justin

How to change background or border brush color of an element while it has template in xaml?

  
Dear all, I want to change some style property of one element in code behind while that element already had a data template in xaml. as an example this is a code for my window: <Window x:Class="Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300" Loaded="Window_Loaded"> <Window.Resources> <Style x:Key="ButtonStyle" TargetType="{x:Type Button}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <ControlTemplate.Resources> <Storyboard x:Key="OnMouseEnter1"> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"> <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/> <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1.1"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Story

GridView Alternate Row not taking on the background color that I specified

  
I have a number of gridview controls within my application.  I am unable to assign the alternating row background color attribute.  All other alternate row attributes do "take".  I have temporarily placed these attributes in-line and removed all references to the CSS and to the skin files.  Here are some code samples.  Any thoughts? <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/SiteMasterSG.Master" AutoEventWireup="true" CodeBehind="AddNewMember.aspx.cs" Inherits="IVA.pages.AddNewMember" %> <asp:Content ID="AddNewMemberMenu" ContentPlaceHolderID="MenuContentPlaceHolder" runat="server"> <asp:SiteMapDataSource ID="MemberSiteMapDataSource" runat="server" ShowStartingNode="False" SiteMapProvider="MemAdmin" /> <asp:SiteMapDataSource ID="GuestSiteMapDataSource" runat="server" ShowStartingNode="False" SiteMapProvider="Guest" /> <asp:SiteMapDataSource ID="CompanyMapDataSource" runat="server" ShowStartingNode="False" SiteMapProvider="CoAdmin" /> <asp:SiteMapDataSource ID="SystemSiteMapDataSource" runat="server" ShowStartingNode="False" Site

HTML Editor: Change Edit Panel Background Color

  
I've created a custom editor from the default AJAX HTMLEditor control to limit the toolbar buttons, etc. But I can't see how to set the background color of the text area in design mode. I'd like to set the background color to something other than white, because with my app most users will want to use white as their text color. White text on a white background is no bueno. The editor has ForeColor and BackColor properties, but these values don't control the text area. I tried creating custom css styles based on Editor.css, but all I end up with is an HTMLEditor without a border. Am I approaching this wrong? Any suggestions?

Change background color of default 2010 look?

  
Hi, I like the default look of the 2010 v4.master.  I was just wondering if it was possible to change just the background color from white to another color (gray in my case)?  Thats really the only change i would like to make.  Thanks!

change the color of label control inside gridview

  

Hi i am saving color as a string in database 

i have a gridview control

 <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnRowUpdating="Update_Schedule"
                    OnRowDeleting="Delete_Schedule" OnPageIndexChanging="OnPaging" OnRowEditing="Edit_Schedule"
                    OnRowCancelingEdit="CancelEdit" PageSize="10">
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:CheckBox ID="Todo" runat="server" AutoPostBack="true" Height="23px" OnCheckedChanged="CheckedChanged" />
                                <asp:HiddenField ID="hdn_ScheduleID" runat="server" Value='<%#Eval("ID") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:Label Text='<%# Eval("Title") %>' runat="server" ID="lbl1"></asp:Label>
                            </ItemTem

How to change the datagrid cell background color linear to the value

  

Hi,

I have a WPF 4.0 Datagrid displaying order values and I need to colour the backgroud of the high value orders so the user will notice high value orders easily. Is it possible to set the colour from white to red but increasing in steps say every 10,000 and increase the colour intensity according to the value.

Many Thanks.

Vijay


Change Background Color of WorkflowDesigner.View

  
The View of a WorkflowDesigner is a derivative of UIElement. Is there a way to change the background color of a UIElement (or WorkflowDesigner View)?

I've searched through documentation and intellisense and couldn't find a way to do this.

The reason I ask is the background for the runtime view of a Workflow is White, which does not fit the theme of my application.

Blog (WPF/C#)
Crystal (WPF Google Contact UI/C# Library)

How to change the background and font color of text for a web part header - Sharepoint 2010

  

Hi I am trying to change the font color and text Header color of the web part, can any one help me with that

Thanks


how to change the color of disabled link button in gridview

  

 

how to change the color of disabled link button in gridview?.. 


trying to change gridview gridlines "color" ??

  

hi,

the below works in Internet Explorer but not firefox.

Does anybody have a solution for this ?

 

protected void Page_Load(object sender, EventArgs e)


    {
       this.GridView1.Attributes.Add("bordercolor", "c3cecc");
    }


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend