http://msdn.microsoft.com/en-us/library/ms178294%28VS.80%29.aspx
In Short here are the steps:-
- Right-click the GridView control and select Show Smart Tag. In the GridView Tasks menu, select Edit Columns. 
- In the Fields dialog box, select yourField from the Selected fields list box. 
- Click Convert this field into a TemplateField link. 
- Click OK to close the Fields dialog box. 
- Right-click the GridView control and select Show Smart Tag. In the GridView Tasks menu, select Edit Templates. 
- Select EditItemTemplate in the Display drop-down list. 
- Right-click the default TextBox control in the template and select Delete to remove it. 
- From the Standard tab of the Toolbox, drag a DropDownList control onto the template. 
- Right-click the DropDownList control and select Show Smart Tag. In the DropDownList Tasks menu, select ChooseData Source. 
- Select SqlDataSource2 (if your dropdown list data source is from there) or you can easily enter in values via the drop downlist data wizard. 
- Click OK. 
- In the DropDownList Tasks menu, choose Edit DataBindings. The SelectedValue property of the DropDownList control is selected in the DataBindings dialog box. 
- Click the Field Binding radio button and select youtField for Bound To. 
- Select the Two-way databinding check box. 
- Click OK. 
- Right-click the GridView control and select Show Smart Tag. In the GridView Tasks menu, click End Template Editing. 
 
No comments:
Post a Comment