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: Wed, 08 Aug 2007 02:27:01 -0700,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    Dinu
          2    Alexey Smirnov
          3    Dinu


how to get text of a control in itemtemplate of gridview   
Hi

how to get text of a control in itemtemplate of gridview and
how can we access and set it properties dynamycally??

Thanks
Date:Wed, 08 Aug 2007 02:27:01 -0700   Author:  

Re: how to get text of a control in itemtemplate of gridview   
On Aug 8, 11:27 am, Dinu  wrote:

> Hi
>
> how to get text of a control in itemtemplate of gridview and
> how can we access and set it properties dynamycally??
>
> Thanks


You can use the FindControl() method

Sample code:

foreach (GridViewRow r in GridView1.Rows)
{
string tb = ((TextBox)r.FindControl("TextBox1")).Text;
}
Date:Wed, 08 Aug 2007 02:48:04 -0700   Author:  

Re: how to get text of a control in itemtemplate of gridview   
On Aug 8, 2:48 pm, Alexey Smirnov  wrote:

> On Aug 8, 11:27 am, Dinu  wrote:
>
> > Hi
>
> > how to get text of a control in itemtemplate of gridview and
> > how can we access and set it properties dynamycally??
>
> > Thanks
>
> You can use the FindControl() method
>
> Sample code:
>
> foreach (GridViewRow r in GridView1.Rows)
> {
> string tb = ((TextBox)r.FindControl("TextBox1")).Text;
>
>
>
> }- Hide quoted text -
>
> - Show quoted text -


hi

i have a gridview and a linkbutton in itemtemplate of that gridview,
and the linkbutton is bounded to database.
now what i want is when a user click on linkbutton i want to navigate
accordingly
to the text of linkbutton and i dont want to use select column, so how
can i find that
which linkbutton is clicked??

please help me in this scenario

Thanks & Regards
Date:Wed, 08 Aug 2007 03:10:27 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


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