DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Thu, 02 Aug 2007 18:22:26 -0000,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    CDonlan
          2    Eliyahu Goldin
          3    CDonlan


Drop down list in gridview header dynamically   
I'm trying to add a drop down list to a gridview header. The number of
columns can change so it has to be done in the code behind (the .cs
file). Please help me with this.
Date:Thu, 02 Aug 2007 18:22:26 -0000   Author:  

Re: Drop down list in gridview header dynamically   
Do it in either RowCreated or RowDataBound event. Both fire for every grid
row, including the header. You can tell the header by looking in the RowType
property.

-- 
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin


"CDonlan"  wrote in message
news:1186078946.620672.118130@z24g2000prh.googlegroups.com...

> I'm trying to add a drop down list to a gridview header. The number of
> columns can change so it has to be done in the code behind (the .cs
> file). Please help me with this.
>
Date:Fri, 3 Aug 2007 09:28:54 +0200   Author:  

Re: Drop down list in gridview header dynamically   
Thanks a lot. I ended up adding it on the row data bound. Can you help
me out with even handling? Im doing

ddl.SelectedIndexChanged += new EventHandler(HandelDropDownList);

but its throwing an error.

Thanks.

On Aug 3, 3:28 am, "Eliyahu Goldin"
 wrote:

> Do it in either RowCreated or RowDataBound event. Both fire for every grid
> row, including the header. You can tell the header by looking in the RowType
> property.
>
> --
> Eliyahu Goldin,
> Software Developer & Consultant
> Microsoft MVP [ASP.NET]http://msmvps.com/blogs/egoldin
>
> "CDonlan"  wrote in message
>
> news:1186078946.620672.118130@z24g2000prh.googlegroups.com...
>
> > I'm trying to add a drop down list to a gridview header. The number of
> > columns can change so it has to be done in the code behind (the .cs
> > file). Please help me with this.
Date:Mon, 06 Aug 2007 20:13:58 -0000   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us