Click here to Skip to main content
15,891,864 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hey friends,
i have a query in my project.actually i am using a gridview in it and i have also used a dropdown in edit item template to update a value in grid.my dropdown has 3 values(COMPLETE,CANCEL,SCHEDULED),actually i am doing updation of a column named,STATUS by this dropdown n it is doing fine.
but now i need that if this status column has a value CANCEL then on clicking on edit,the dropdown must only contain 2,values SCHEDULED and COMPLETE (no CANCEL),how can i do it by row data bound.
help?
Posted
Updated 15-Jul-13 19:31pm
v2
Comments
Mahesh Bailwal 13-Jul-13 11:30am    
Share your code for better answer.
bhupesh19890 16-Jul-13 1:39am    
ok i will share.which pages should i post.both aspx and .cs??
CHill60 13-Jul-13 13:06pm    
And please stop using text speak ('n' = 'and', 'plzzz' = 'please') - it makes you sound childish and can put people off helping you
bhupesh19890 16-Jul-13 1:38am    
it was nothng childish in that actually i was fed up of that problem of mine..so it just came out in diffrent way...and yes i have removed that thing (plzzz),and if it is ok now to answer,could you please help??

1 solution

If e.Row.RowType = DataControlRowType.DataRow AndAlso dgrd_WWWH_How.EditIndex = e.Row.RowIndex Then
Dim ddlresp As DropDownList = CType(e.Row.FindControl("ddlResp"), DropDownList)
Dim txtresp = CType(e.Row.FindControl("txtResp"), Label)
binddropdownlist()
ddlresp.Items.FindByText(txtresp.Text).Selected = True
End If
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900