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

New Message on BDOTNET

-----------------------------------------------------------
From: Neeraj_Bangalore
Message 6 in Discussion



Hi, 
 
This is what you must have in ASPX 
Page. 
<asp:datagrid - -- ---- -- - - - - - -- - -- - - - 
>
<Columns>
        
<asp:TemplateColumn>
            
<ItemTemplate>
                  
<asp:DropDownList id="MyDropDownLIst" runat="server" AutoPostBack="True" 
OnSelectedIndexChanged="MyCustomMethod"></asp:DropDownList>
            
</ItemTemplate>
        
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
 
In ASPX.VB page, what we should have 
is 
 
Protected Sub MyCustomMethod(ByVal sender As Object, ByVal e As 
System.EventArgs)   
    Dim strValue 
as String
    strValue = 
DirectCast(sender, DropDownList).SelectedValue
End 
Sub
 
And if you want to access 
any other control in that method which is raising this event then try this 
code in the same 
method.
 
DirectCast(sender.Parent.FindControl("MyTextBox"), TextBox).Text = 
"Changed Value"
 
I feel that you are using C#, please 
do convert this code as per the requirement. 
 
Try this and revert 
back........
 
Regards,
Neeraj 
Saluja
SCT Software Solutions, Bangalore

 

  -----Original Message-----
From: haideep 
  [mailto:[EMAIL PROTECTED]
Sent: Friday, January 02, 2004 8:02 
  PM
To: BDOTNET
Subject: Re: problem with 
  datagrid


  
    
      
      New Message on BDOTNET
    
      

  problem 
    with datagrid


    
      
      
        Reply

        
          
            
            
               
              Reply to Sender   Recommend 
              Message 5 in 
                Discussion 
      
        
          
            
            
              From: haideep 
            
              

                Hi Pawan,
                 
                 i don't want to use edit item command of datagrid 
                which they'd used in the URL which u sent to me. if u know some 
                other way to handle this.  please send me a sample 
                code.
                Hi Neeruj
                I'm using (!IsPostBack) and moreover i want to call a new 
                method on selectedindexchanged event of dropdown and i want to 
                store the selected item value in some string. Pl......
                 
                Regards,
                Deepak
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/bdotnet/_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