I would write some code real quick to just tell you what is in there. It is telling you that you are trying to access somthing in a collection that is out side the scope (size) of said collection.
Travis D. Falls | Consultant RAFT.Net IT | 860.547.4070 | [EMAIL PROTECTED] -----Original Message----- From: AspNetAnyQuestionIsOk@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Mark E Sent: Friday, December 16, 2005 9:15 AM To: AspNetAnyQuestionIsOk@yahoogroups.com Subject: Re: [AspNetAnyQuestionIsOk] Can I access cssstyle property of a header in a datagrid? It's being called at the end of the Page_load method. The DG is already filled and *should* be accessible. Or so I thought. Mark ----- Original Message ---- From: Dean Fiala <[EMAIL PROTECTED]> To: AspNetAnyQuestionIsOk@yahoogroups.com Sent: Friday, December 16, 2005 8:56:13 AM Subject: Re: [AspNetAnyQuestionIsOk] Can I access cssstyle property of a header in a datagrid? When are you attemptting to call it? It is possible you haven't created the grid or filled its columns yet. On 12/16/05, Mark E <[EMAIL PROTECTED]> wrote: > Dean, > > I'm getting the following error when I run the page: > > System.ArgumentOutOfRangeException: Index was out of range. Must be > non-negative and less than the size of the collection. Parameter name: index > > I tried changing the index but all values throw the same error. Any idea why? > > Thanks, > Mark > > > ----- Original Message ---- > From: Dean Fiala <[EMAIL PROTECTED]> > To: AspNetAnyQuestionIsOk@yahoogroups.com > Sent: Friday, December 16, 2005 8:35:47 AM > Subject: Re: [AspNetAnyQuestionIsOk] Can I access cssstyle property of a > header in a datagrid? > > Yes. > > dg.Columns[2].HeaderStyle.CssClass = "SomeCSS"; > > On 12/16/05, Mark E <[EMAIL PROTECTED]> wrote: > > Is something like this possible? > > > > datagrid.header.column[2].cssstyle = "SomeCSS"; > > > > I need all my datagrid columns to have the same style except 1. Since I > > don't manually code my header columns, I need to do this in code-behind. > > Is this possible? > > > > Thanks, > > Mark > > > > [Non-text portions of this message have been removed] > > > > > > > > > > > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > > > -- > Dean Fiala > Very Practical Software, Inc > http://www.vpsw.com > > > > SPONSORED LINKS > Basic programming language Computer programming languages Programming > languages > Java programming language > > > > > > YAHOO! GROUPS LINKS > > > Visit your group "AspNetAnyQuestionIsOk" on the web. > > To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. > > [Non-text portions of this message have been removed] > > > > > > Yahoo! Groups Links > > > > > > > -- Dean Fiala Very Practical Software, Inc http://www.vpsw.com YAHOO! GROUPS LINKS Visit your group "AspNetAnyQuestionIsOk" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. [Non-text portions of this message have been removed] Yahoo! Groups Links ************************************************************************* This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. ************************************************************************* ------------------------ Yahoo! Groups Sponsor --------------------~--> Most low income homes are not online. Make a difference this holiday season! http://us.click.yahoo.com/5UeCyC/BWHMAA/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/