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

Set selectedvalue on comboboxadv doesnt work

Thread ID:

Created:

Updated:

Platform:

Replies:

74692 Jun 25,2008 04:11 AM UTC Jul 7,2008 07:22 AM UTC Windows Forms 8
loading
Tags: Tools
Sherly Numawaty
Asked On June 25, 2008 04:11 AM UTC

dear all..
I'm using vs 2003
and i was generate one combobox on runtime...
i set DropDownStyle become System.Windows.Forms.ComboBoxStyle.DropDownList

my problem is, i wanna set default value to that combo using combobox.SelectedValue..
but it doesn't work..
on combobox doesn't appear any value

is there any condition which should fulfilled to make selectedValue work?

thanks in advance


sherly


Administrator [Syncfusion]
Replied On June 25, 2008 12:15 PM UTC

Hi Sherly,

Thank you for using Syncfusion products.

I am afraid that I was not able to see the issue of Selectedvalue on comboboxadv doesn't work . Please refer the simple sample below and let me know the Essential Studio version you are using.

http://websamples.syncfusion.com/samples/Tools.Windows/F74692/main.htm

Regards,
Jaya


Sherly Numawaty
Replied On June 26, 2008 02:40 AM UTC

Hi Jaya

thanks for ur reply

i'm using .net framework 1.1, and using syncfusion 5.201.0.25

is any problem with above version?

thanks sherly


Administrator [Syncfusion]
Replied On June 26, 2008 01:05 PM UTC

Hi Sherly,

Thanks for the update.

I am afraid that I was not able to see the issue of Selectedvalue on comboboxadv doesn't work in 1.1 framework 5.2.0.25 version . Please refer the sample below in which ValueMember of selected item of ComboBoxAdv will be displayed.

http://websamples.syncfusion.com/samples/Tools.Windows/F74692/Win_Tools_ComboBoxAdv_5.2.zip

Regards,
Jaya




Sherly Numawaty
Replied On July 1, 2008 03:08 AM UTC

Hi Jay

i've tried this code

this.comboBoxAdv1.SelectedValue = 2;
this.comboBoxAdv1.DataSource = dt;
this.comboBoxAdv1.DisplayMember = "Name";
this.comboBoxAdv1.ValueMember = "PreName";
this.comboBoxAdv1.DropDownStyle = ComboBoxStyle.DropDownList;

actually i want to select the second value on list...
but i think it's doesnt work

thanks

sherly



Administrator [Syncfusion]
Replied On July 1, 2008 07:04 AM UTC

Hi Sherly,

Please use the codesnippet below to display the second item (Mark) of ComboBoxAdv as SelectedValue.

[C#]

this.comboBoxAdv1.SelectedValue = "Tucker";

Please let me know if this helps you.

Regards,
Jaya



Sherly Numawaty
Replied On July 2, 2008 01:51 AM UTC

Hi Jaya...
here i attach u my code..

it doesnt work

sherly



combo_c922ad01.zip

Sherly Numawaty
Replied On July 2, 2008 09:39 AM UTC

hi jaya...
thanks for all...
I've got the problem n has solved..
i should set selectedValue after i add that control to form...


comboBoxAdv1 = new ComboBoxAdv();
DataTable dt = TableEmp();
this.comboBoxAdv1.DataSource = dt;
this.comboBoxAdv1.DisplayMember = "Name";
this.comboBoxAdv1.ValueMember = "PreName";
this.comboBoxAdv1.DropDownStyle = ComboBoxStyle.DropDownList;
this.comboBoxAdv1.Location = new Point(113,57);
this.Controls.Add(comboBoxAdv1);
comboBoxAdv1.SelectedValue = "Tucker";







Administrator [Syncfusion]
Replied On July 7, 2008 07:22 AM UTC

Hi Sherly,

Thanks for the update. Please let me know if you have any further issues.

Regards,
Jaya


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

;