SharePoint Dropdown Vaue not updating in to Dataview webpart
I have a data view webpart and its source is a sql server database table(2005). I have the data view setup to be able to edit some of the fields inside the dataview. Instead of providing the user with a textbox to edit the values I would like to provide a dropdown list with specific values that the user can select from.I got the dropdown and made sure the selected values are perfect but I haven't been successful while I hit the save button its not taking my dropdown value its just showing the previous value which was already in that field that means its not updating the dropdown value but its working perfect if it is textbox. Does anyone know how this is done in Sharepoint Designer tool ? I have been hitting the google for past 2 days so it would be great if any of one have the solution for this issue. To make it easy to understand I had pasted my code 1.First one is the SQL datasource which is in the dataview webpart 2.Dropdown box associated to the dataview webpart 1. <DataSources> <asp:SqlDataSource id="SqlDataSource4" runat="server" __designer:commandsync="true" ProviderName="System.Data.SqlClient" ConnectionString="Data Source=Name;User ID=USID;Password=password;Initial Catalog=USID;" SelectCommand="SELECT * FROM [table1] " UpdateCommand="UPDATE [table1] SET [EX Number] = @EX _x0020_Number, [Region Name] = @Region_x0020_Name, [Assignment Name] = @Assignment_x0020_Name WHERE [Identity] = @original_Identity AND [EX Number] = @original_EX _x0020_Number AND [Region Name] = @original_Region_x0020_Name AND [Assignment Name] = @original_Assignment_x0020_Name" OldValuesParameterFormatString="original_{0}" ConflictDetection="CompareAllValues"> <UpdateParameters> <asp:Parameter Name="EX _x0020_Number"/> <asp:Parameter Name="Region_x0020_Name"/> <asp:Parameter Name="Assignment_x0020_Name"/> <asp:Parameter Name="original_Identity"/> <asp:Parameter Name="original_EX _x0020_Number"/> <asp:Parameter Name="original_Region_x0020_Name"/> <asp:Parameter Name="original_Assignment_x0020_Name"/> </UpdateParameters> </asp:SqlDataSource> </DataSources> 2. <SharePoint:DVDropDownList runat="server" id="ff3{$Pos}" DataTextField="Assignment_Name" DataSourceID="SqlDataSource2" DataValueField="Assignment_Name" selectedvalue={@Assignment_x0020_Name} EnableViewState="true" __designer:bind ="{ddwrt:DataBind('u',concat('ff3',$Pos),'selectedvalue','selectedIndexChanged','Assignment_Name',ddwrt:EscapeDelims(string(@Assignment_Name)),'@Assignment_x0020_Name')}" /> It looks like everything is good but I dont know for some reasons dropdown values are not updating to the datasource. Do I miss something??Please let me know Thanks Vinodh Sankaran
August 6th, 2010 5:09pm

Hi Vinodh, This is the duplicate question and this has been already answered on http://social.technet.microsoft.com/Forums/en-US/sharepointcustomization/thread/9f648a27-e334-4b3e-b081-017d09c0af95Warm Regards, Pratik Vyas | SharePoint Consultant | http://sharepointpratik.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
April 26th, 2011 7:36am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics