Gridview rowupdating dropdownlist selectedvalue

We will use this as our Data Source in the Grid View later.The Get Product Makes() method gets all the available Makes which in this case we just added 3 main items on it.

gridview rowupdating dropdownlist selectedvalue-34

Hence, you cannot do a simple equality check when you are on Edit mode.

Instead you must do something like this: Once we’ve manage to determine the edit-state then we can now begin accessing the controls using Find Control() method and bind it with the corresponding Data Sources.

Free counters Added on January 19,2012 Follow Me @vmsdurano A bit About Me Disclaimer The opinions expressed herein are my own personal opinions and does not represent the opinions of my employers.

Nor does it represent the opinion of my dog, because I don’t have one.

The 2nd and 3rd columns are Template Fields that contains a Label control within an .

This means that on read-only state the Label will be displayed and on edit-state the Drop Down List will be displayed to allow users to modify the selection of their choice.

If you notice, I’ve set the Selected Value for the ddl Make and ddl Model Drop Down Lists so that by the time the user clicks Edit the Drop Down List will be pre-selected with the previous item the user has chosen.

The ddl Product Make_Selected Index Changed event is where we actually do the cascading feature by populating the second Drop Down List based from the value selected from the first Drop Down List.

The Product Model class is where we store all the Models for each Makes.

Tags: , ,