Click here to Skip to main content
15,906,816 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello friends,
I trying to use viewstate in RowDataBound event of grid.
ViewState.Add("ddlGClient", ddlGClient)
ViewState.Add("ddlGBrandCategory", ddlGBrandCategory)

Problem is, when I click on edit link the grid does not go to edit mode.
But when I remove the code, the grid goes to edit mode (Controls in EditItemTemplete gets visible)

Basically what I'm trying cascading dropdown in grid. I'm saving this control in viewstate and then I'm pass it to following event

Protected Sub ddlGClient_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)      fillBrandCategorydropdown(CType(ViewState(ddlGClient),DropDownList).SelectedValue)
End Sub


What is the logic behind grid not getting into edit mode?<br />
Why the RowDataBound event is called twice for each row?


Any idea?

Thanks in advance
Posted

1 solution

Check this for cascading dropdown in ASP.Net
http://www.dotnetcurry.com/ShowArticle.aspx?ID=221[^]
 
Share this answer
 
Comments
dhage.prashant01 14-Jul-11 7:33am    
Thanks
But use of viewstate affects grids mode?

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