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.
Syncfusion Feedback

MultiSelectionDropDown

Thread ID:

Created:

Updated:

Platform:

Replies:

61679 May 30,2007 07:37 PM UTC Jun 1,2007 08:35 AM UTC ASP.NET Web Forms (Classic) 3
loading
Tags: Tools
Richard
Asked On May 30, 2007 07:37 PM UTC

Is there a way to set both the datatextfield and datavaluefield and get the datatextfield in the to display in the text field?

The default behavior appears to use the datatextfield unless a the datavaluefield is populated.

I need the datavaluefield for updates but want the users to see just the datatextfield in the textbox.

Maheswari [Syncfusion]
Replied On May 31, 2007 02:12 PM UTC


Hi Richard,

I am afraid that there is no property to display the datatextfield value in the textbox when both fields are set.

I have created a feature request and notified our development team on this regard.

Please let me know if you have any other questions.

Thank you for using Syncfusion products.

Regards,
Maheswari

Richard Slauenwhite
Replied On May 31, 2007 02:21 PM UTC

I guess the obvious next question is "If we have the source code, should I be able to make the change?"

Maheswari [Syncfusion]
Replied On June 1, 2007 08:35 AM UTC


Hi Richard,

I regret for the inconvenience caused. On further investigation we have found that to use datatextfield value in the textbox when both datatextfield and datavaluefield are set can be achieved by using the below code :

[Code]
function OnItemChecked(Odata)
{
// Get Text separator symbol from Controls attribute collection.
var TextSepearator=document.getElementById("MultiSelectionDropDown1").getAttribute('TextSeparator');
var sText = "";
// Get the number of Checked Items in the Control's Popup
var nSelItemsCount = Odata.Instance.SelectedItems.length;
if( 0 < nSelItemsCount )
{
//Iterate and form the string with CheckedItems Text and Text separator
for( var i = 0; i < nSelItemsCount - 1; i++ )
{
var oItemData = Odata.Instance.SelectedItems[ i ];
sText += oItemData.Text + TextSepearator;
}
sText += Odata.Instance.SelectedItems[ nSelItemsCount - 1 ].Text;
}
//In the attached sample, I have displayed the Value field by an Div Tag, ' Value '. Client Objects 'NewText ' property have Checked Items Value field.
document.getElementById("Value").innerText=Odata.NewText;
//Return the string
return sText;
}

Please refer the attached sample which illustrates the above :
Forum_61679.zip

I hope this helps you.

Thank you for using Syncfusion products.

Regards,
Maheswari


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.

Warning Icon 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.Close Icon

;