If we select the dro开发者_开发技巧pdown list Item then I want to display the Item Particulars in the Gridview Please Help me
On the SelectedIndexChanged of the dropdown rebind your GridView off of the selected value
Add a dropdownlist control, a button control, a grid view and an sqldatasource.
- Configure the datasource first in sqldatasource.
- I would recommend write a storeprodure to fetch data into the gridview (sqldatasource).
- Bound the parameter to "controls" and select the dropdownlist. Now your DDL is bound to the gridivew. In his table click on advance properties and change property convertemptystringto null = false. (there property is something similar).
- If you want a button to update the grid view, do this. Add the default event control to the button, put no code in it.
- If you want to change the grid view content based on select directly then choose autopost on selected changed in properties of the DDL.
If everything is fine, this should populate your grid view based on contents in DropDownlist
精彩评论