I Have a and ASP.NET GridView which is set so
<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False"
CellPadding="4"
DataKeyNames="Pric_PricingID"
DataSourceID="CRMDataSource1"
EnableModelValidation="True"
GridLines="None"
AllowPaging="True"
AllowSorting="True"
Width="100%"
CssClass="GRIDHEAD"
onselectedindexchanged="GridView1_SelectedIndexChanged">
One of the fields I need to be a drop down value when the row is edited the user will select a value and click update this will then set the column value of price_c_alfsupreq to the select value I believe that this is done using a post back? I am new to this so any help would be fantastic.
Thanks
You can try to add a commandfield in your gridview. This will set a “Edit”-button. When this button is clicked, you will get the EditItemTemplates which you see below.
And then add a templatefield with a editTemplate inside – here the dropdownlist is enabled, so you can chose from it.
and in your datasource add a UpdateCommand, which evaluates the value in the ddl1Edit.