saloj
asked on
DetailsView edit page
HI EE,
I have page DetailsView and ObjectDataSource. when I hit "edit" DetailsView, on the Sectors filed,
I want to create new query to display all sector list with CheckBoxList and check on the selected sectors.
And when I update the newly selected sectors should be updated!
pls help, how can I do it!
Thank you
I have page DetailsView and ObjectDataSource. when I hit "edit" DetailsView, on the Sectors filed,
I want to create new query to display all sector list with CheckBoxList and check on the selected sectors.
And when I update the newly selected sectors should be updated!
pls help, how can I do it!
Thank you
<asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="125px"
DataSourceID="ObjectDataSource1" EnableModelValidation="True"
AutoGenerateRows="False" DataKeyNames="PubContactID">
<Fields>
<asp:BoundField DataField="PubContactID" HeaderText="PubContactID"
InsertVisible="False" ReadOnly="True" SortExpression="PubContactID" />
<asp:BoundField DataField="ContactName" HeaderText="ContactName"
SortExpression="ContactName" />
<asp:BoundField DataField="ContactPhone" HeaderText="ContactPhone"
SortExpression="ContactPhone" />
<asp:BoundField DataField="ContactEmail" HeaderText="ContactEmail"
SortExpression="ContactEmail" />
<asp:BoundField DataField="ContactCity" HeaderText="ContactCity"
SortExpression="ContactCity" />
<asp:BoundField DataField="ContactNotes" HeaderText="ContactNotes"
SortExpression="ContactNotes" />
<asp:BoundField DataField="PublicID" HeaderText="PublicID"
SortExpression="PublicID" />
<asp:BoundField DataField="Sectors" HeaderText="Sectors"
SortExpression="Sectors" />
<asp:CommandField ShowEditButton="True" />
</Fields>
</asp:DetailsView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
SelectMethod="GetSubPublicationDetails" TypeName="DataAccess"
UpdateMethod="UpdateSubPublicationDetails"
onupdated="ObjectDataSource1_Updated">
<SelectParameters>
<asp:QueryStringParameter Name="PubID" QueryStringField="id" Type="Int32"
DefaultValue="" />
<asp:QueryStringParameter DefaultValue="eng" Name="lang"
QueryStringField="lang" Type="String" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="ContactName" Type="String" />
<asp:Parameter Name="ContactPhone" Type="String" />
<asp:Parameter Name="ContactEmail" Type="String" />
<asp:Parameter Name="ContactCity" Type="String" />
<asp:Parameter Name="ContactNotes" Type="String" />
<asp:Parameter Name="Sectors" Type="String" />
<asp:Parameter Name="PublicID" Type="Int32" />
<asp:Parameter Name="PubContactID" Type="Int32" />
</UpdateParameters>
</asp:ObjectDataSource>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.