I am looking for some help in designing the Dropdownlist control with Checkbox selection.
A Dropdownlist contains the selection value like Table 1, Table 2, Table 3 and Table 4. When user click on Table 1 there should be another window activated preferable next to the Dropdownlist and shows Item 1, Item 2, Item 3 with checkbox in front of the
text when user checks Item 3 and click on Button a pdf file must be opened associated with Item 3. and so on. I am confused what to use? Jquery, Javascript or AjaxToolkit? I guide will be highly appreciated.
If the data from your dropdown has a link to the data that you want to display in the checkbox list, then you can use two controls. a DropDownList that holds the values for your list of table selection (e.g Table1,Table2,Table3 etc..). And then a CheckBoxList
control that will hold the sub-data. You can get the selected value from the dropdownlist and then pass it your query to get all the items associated within that value selected and then populate the result to your CheckBoxList control.
I am going to use Dropdown list with fixed/static link data for the checkbox and not going for dynamic database tables. I am looking for some kind of sample which I can learn more to achieve this.
Just handle the SelectedIndexChanged event of ddl to use its selectedvalue to generate the datasource to bind a GridView. This GridView can have a CheckBox, Label in ItemTemplate of GridView. You can bind items to the Label control. Then handle the Click
event of Button to loop the rows in GridView for checking items with checked and use the following way to display the selected items to PDF:
ypanchal
Member
1 Points
14 Posts
Dropdownlist Control
Jun 26, 2012 07:18 PM|LINK
Hello,
I am looking for some help in designing the Dropdownlist control with Checkbox selection.
A Dropdownlist contains the selection value like Table 1, Table 2, Table 3 and Table 4. When user click on Table 1 there should be another window activated preferable next to the Dropdownlist and shows Item 1, Item 2, Item 3 with checkbox in front of the text when user checks Item 3 and click on Button a pdf file must be opened associated with Item 3. and so on. I am confused what to use? Jquery, Javascript or AjaxToolkit? I guide will be highly appreciated.
Thanks in advance.
vinz
All-Star
127011 Points
17934 Posts
MVP
Re: Dropdownlist Control
Jun 27, 2012 09:47 AM|LINK
If the data from your dropdown has a link to the data that you want to display in the checkbox list, then you can use two controls. a DropDownList that holds the values for your list of table selection (e.g Table1,Table2,Table3 etc..). And then a CheckBoxList control that will hold the sub-data. You can get the selected value from the dropdownlist and then pass it your query to get all the items associated within that value selected and then populate the result to your CheckBoxList control.
MessageBox Controls for WebForms | Blog | Twitter | Linkedin
ypanchal
Member
1 Points
14 Posts
Re: Dropdownlist Control
Jun 27, 2012 02:19 PM|LINK
I am going to use Dropdown list with fixed/static link data for the checkbox and not going for dynamic database tables. I am looking for some kind of sample which I can learn more to achieve this.
Qin Dian Tan...
All-Star
113532 Points
12480 Posts
Microsoft
Re: Dropdownlist Control
Jun 28, 2012 07:23 AM|LINK
Hi,
Just handle the SelectedIndexChanged event of ddl to use its selectedvalue to generate the datasource to bind a GridView. This GridView can have a CheckBox, Label in ItemTemplate of GridView. You can bind items to the Label control. Then handle the Click event of Button to loop the rows in GridView for checking items with checked and use the following way to display the selected items to PDF:
http://www.codeproject.com/Articles/20640/Creating-PDF-Documents-in-ASP-NET
Thanks,
If you have any feedback about my replies, please contactmsdnmg@microsoft.com.
Microsoft One Code Framework