2014年7月13日 星期日

[RESOLVED] DetailsView allow Multi Select




<%#Eval("GroupName")%>


datatextfield="religion" DataValueField="religion"
SelectedValue='<%# Bind("DESCRIPTION") %>' runat="server"
AppendDataBoundItems = "True">
select faith group...



datatextfield="religion" DataValueField="religion"
SelectedValue='<%# Bind("DESCRIPTION") %>' runat="server"/>
ErrorMessage="Faith is required.">




I need to allow the user to MultiSelect within a DetailsView.


How can I acheive this?


Currently they can only select 1 item per entry as shown below.


 



for multi select i think you should replace DropDownList with CheckBoxList, so that user can simple tick the items he wants to select.


thanks 



Can you assist in replicating my original script to a CheckBoxList


Thanks



here is the updated code,



datatextfield="religion" runat="server"
AppendDataBoundItems = "True">
select faith group...


thanks







ijaz_asp



here is the updated code,


  id="relig" datasourceid="SqlDataSource1" AutoPostBack="true" datatextfield="religion" runat="server" AppendDataBoundItems = "True">  Value="0">select faith group...  

thanks







because the datasource contains over 30 available options, its over two page long... i think this option would work, if there was only a small options.


Can i set it as a scrollbar or something?



any assistance please



Hi,


So now you are worry about how to select the checkbox in many pages, please try to refer to the following articles:


#Maintaining States of Selected CheckBoxes in Different Pages:

http://www.codeproject.com/Articles/31849/Maintaining-States-of-Selected-CheckBoxes-in-Diffe .


#Select Checkboxes while Paging:

http://aspadvice.com/blogs/azamsharp/archive/2006/10/26/Select-All-Checkboxes-while-Paging-in-GridView.aspx .


Hope it can help you.


Best Regards,

Amy Peng 


 


沒有留言:

張貼留言