Dear all,

i have little problem in dropdownlist and datagrid 

Here is the case

i have datagrid and 2 dropdownlists on it in edit mode 

Dropdownlist_1 content Cities 

Dropdownlist_1 content areas ok....

i fill the dropdownlist with no problems 

the problem 

i want to use SelectedIndexChanged event in dropdownlist_1 to take efficet in 
dropdownlist_2 

i belive i'll use OnItemDataBound i try this 

Dim mydrp As DropDownList = CType(e.Item.FindControl("Cities"), DropDownList)
AddHandler mydrp.SelectedIndexChanged, AddressOf makeSomething

Private Sub makeSomething(sender As Object, e As System.EventArgs)

' fill 2nd dropdownlist_2 depend on seleced item on dropdownlist_1

strSQL_ = " SELECT  *  FROM area  where CityID_FK= "&Cities.SelectedItem.Value 
Dim sda_ as new OledbDataAdapter(strSQL_, objConn_)
Dim ds_ as new DataSet()

sda_.Fill(ds_)
 dropdownlist_2.DataSource = ds_.Tables(0)
 dropdownlist_2.DataTextField = ds_.Tables(0).Columns("areaname").ColumnName.ToString()
 dropdownlist_2.DataValueField = ds_.Tables(0).Columns("areaID").ColumnName.ToString()
 dropdownlist_2.DataBind () 

end sub 

but it doesn�t go to makeSomething() 

Any ideas......

thnx for your time

                
---------------------------------
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs 

[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/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/
 

Reply via email to