-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: Samg
Message 3 in Discussion


Hi Jignesh,
 
        
        Thanks a lot for your reply.
        
        I got your solution to some extent but 
still i have some clarifications.
        
        My basic requirement is: in a particular 
column in a datagrid, i need some rows to display as hyperlink text and 
other rows to display as normal text.
        
        So under 
the ItemDataBound event i have code like this:
 
             If 
<some condition to display as hyperlink> = True then    

        
            dim x as new hyperlink( 
)

        
            x.text 
="rediff"
    
                
x.navigateurl = www.rediff.com
                    
dim y as hyperlink =   
CType(e.items.FindControl("PH"),HyperLink)
                    
y.controls.add(x)
        
        Else
        
            dim x as new label( 
)

        
            x.text 
="rediff"
                    
dim y as label=   CType(e.items.FindControl("PH"),label)
                    
y.controls.add(x)
        
        End if
 
        
        Please correct the above code if it is 
wrong.
 
Thanks in advance
Sam

  ----- Original Message ----- 
  From: 
  Jigs 
  To: MumbaiUserGroup 
  Sent: Tuesday, June 29, 2004 5:08 
PM
  Subject: Re: Regarding Datagrid and 
  Usercontrol in asp.net
  

  
    
      
      New Message on MumbaiUserGroup
    
      

  Regarding 
    Datagrid and Usercontrol in asp.net


    
      
      
        Reply

        
          
            
            
               
              Reply to Sender   Recommend 
              Message 2 in 
                Discussion 
      
        
          
            
            
              From: Jigs 
            
              

                Hi 
                SAM,
                 
                Answer to your 1st question.
                 
                Assuming your column is of template type. 
                Add 
                a placeholder column in your datagrid named as "ph"
                now 
                in code under ItemDataBound event create your desired 
                control.
                eg: 
                dim x as new hyperlink( )
                      x.text 
                ="rediff"
                      x.navigateurl = www.rediff.com
                    dim y as hyperlink =   
                CType(e.items.FindControl("PH"),HyperLink)
                    y.controls.add(x)
                 
                This 
                is how u dynamically add custom controls to your datagrid 
                column.  
                 
                You 
                can add to controls collection (n) number of column you desire. 
                
                feel free to ask if you are still 
                unable to solve. 
                 
                Regards,
                Jignesh Desai.
                http://www.dotnetJiNi.com 
                 
                 
View other groups in this 
    category. 



-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to