Yes, it is changed to a plain table, all ASP.NET <http://ASP.NET> code 
eventually ends up as plain HTML and javascript, that's why you have to
1) write your own client side function to highlight the row without postback
2) identifty the rows uniquely on the client side, so you can do #1

AlternativeItem and Item set the styles when the grid is generated or 
updated on the server side and then render the appropriate HTML. if you want 
to change colors without postback, you need to change things via javascript 
to set the appropriate properties in the HTML elements on your page.

Here's an example of highlighting a row in javascript:
http://www.js-examples.com/javascript/?view=1058

I also sugegst you buy or borrow a copy of the javascript bible:

http://www.amazon.com/exec/obidos/tg/detail/-/0764557432/qid=1126876587/sr=8-1/ref=pd_bbs_1/102-1892347-9296165?v=glance&s=books&n=507846

On 9/16/05, Arindam <[EMAIL PROTECTED]> wrote:
> 
> Dean,
> I have tried that way , but i added "this.bgColor='#ffcc66'" insted of
> JavaScript:HighlightRow(" + RowID + "), but that was happening for that 
> cell not for entire row.
> Now in HighlightRow function with RowID how do u manage the color changing 
> event in client side script ? bcos after rendering grid is convertd in a 
> plain table ,
> so somehow the color changing has to be implemented with Item or 
> AlternativeItem ....
> can u please clarify ...
> 
> Thnaks
> AC
> 
> Dean Fiala <[EMAIL PROTECTED]> wrote:
> You have to turn off the Autopostback on the checkbox, so it doesn't post
> back when clicked.
> 
> Then add an attribute to fire on the clientside when the check box if
> clicked:
> cb = e.Item.FindControl("nameofyourcheckbox")'
> cb.Attributes.Add("onClick", "javascript:HighlightRow(" + RowID + ")");
> 
> Then add a javascript function called HighlightRow to your page that takes
> the RowID as a parameter. Loop through the rows until you find the
> corresponding ID and se the bgColor appropriately.
> 
> 
> On 9/15/05, Arindam wrote:
> >
> >
> > Hi Champs,
> >
> > I want to change the row's bgcolor when check box is checked in 
> datagrid,
> > without any post ...like how it happen in hotmail, yahoo mail box..
> >
> > to do the job on mouseOver i do
> > e.Item.Attributes.Add("onMouseOver", "this.bgColor='#ffcc66'");
> > in ItemDataBound ...working fine
> >
> >
> > but to deal with checkbox checked without a postback ...not happening .
> > i need your help .
> >
> > Regards
> > Arindam
> >
> >
> >
> >
> > ---------------------------------
> > Yahoo! India Matrimony: Find your partner now.
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> 
> 
> --
> Dean Fiala
> Very Practical Software, Inc
> http://www.vpsw.com
> 
> 
> [Non-text portions of this message have been removed]
> 
> 
> 
> 
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------
> Yahoo! India Matrimony: Find your partner now.
> 
> [Non-text portions of this message have been removed]
> 
> 
> 
> 
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 


-- 
Dean Fiala
Very Practical Software, Inc
http://www.vpsw.com


[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to