We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Multi Selection Drop Down

Thread ID:

Created:

Updated:

Platform:

Replies:

71404 Jan 29,2008 08:10 PM Feb 1,2008 07:48 AM ASP.NET Web Forms (Classic) 3
loading
Tags: Tools
Vinod
Asked On January 29, 2008 08:10 PM

Hi,

I am using multi-selection drop-down in my application for displaying the name of the employees. My objective is to send e-mail by selecting the name(s). for this i bind the value like this

DataTextField - Employee Name
DataValueField - EmployeeID.

now on selecting the employee name their id is displaying in the box insted of their name.

My requirement is to display the name in the box and on a button event i want to get the corresponding id's of the employees.

(same as in the generic ASP.NET drop-down control).





Vishnu Kumar [Syncfusion]
Replied On January 31, 2008 03:52 AM

Hi Vinod,

Thank you for posting your query to us.

Issue : Display the name in the box and on a button event i want to get the corresponding id's of the employees.

If your intention is to get the corresponding value of the selected id in multiselection dropdown,It can be achieved by using the below code snippet:


[c#]
this.MultiSelectionDropDown1.DataTextField = "ID";
this.MultiSelectionDropDown1.DataValueField = "Value";


Please refer the sample in the below link which illustrates the above.

http://websamples.syncfusion.com/samples/Tools.Web/6.1.0.34/71404/main.htm

If I have misunderstood your requirement, could you please explain me in detail, so that I can work in depth and try to send a better solution?

Regards,
Vishnu.


Vinod
Replied On January 31, 2008 09:38 AM

Hi Vishu

Thank you very much for your prompt reply and support. Kindly find the attachment. I hope that is self explantory.

What we need is Once we select (by checking) the names, in the top the name is to be displayed where as we are able to display number only.

Help Requested

Regards

Vinod Robert




>Hi Vinod,

Thank you for posting your query to us.

Issue : Display the name in the box and on a button event i want to get the corresponding id's of the employees.

If your intention is to get the corresponding value of the selected id in multiselection dropdown,It can be achieved by using the below code snippet:


[c#]
this.MultiSelectionDropDown1.DataTextField = "ID";
this.MultiSelectionDropDown1.DataValueField = "Value";


Please refer the sample in the below link which illustrates the above.

http://websamples.syncfusion.com/samples/Tools.Web/6.1.0.34/71404/main.htm

If I have misunderstood your requirement, could you please explain me in detail, so that I can work in depth and try to send a better solution?

Regards,
Vishnu.





window.zip

Vishnu Kumar [Syncfusion]
Replied On February 1, 2008 07:48 AM

Hi Vinod,

Thank you for your patience.

Issue 1: What we need is Once we select (by checking) the names, in the top the name is to be displayed where as we are able to display number only

i) You can display the value is box when checking the checkbox in a dropdown using below code snippet:


[c#]
this.MultiSelectionDropDown1.DataTextField = "Value";
this.MultiSelectionDropDown1.DataValueField = "Value";


ii)You can get the selected item value in button click event using the below code snippet:

[c#]
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write(MultiSelectionDropDown1.Text);
}



Please let me know if you have any other concerns.

Regards,
Vishnu.



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;