Set selectedvalue on comboboxadv doesnt work
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
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
SIGN IN To post a reply.
8 Replies
AD
Administrator
Syncfusion Team
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
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
SN
Sherly Numawaty
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
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
AD
Administrator
Syncfusion Team
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
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
SN
Sherly Numawaty
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
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
AD
Administrator
Syncfusion Team
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
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
SN
Sherly Numawaty
July 2, 2008 01:51 AM UTC
SN
Sherly Numawaty
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";
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";
AD
Administrator
Syncfusion Team
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
Thanks for the update. Please let me know if you have any further issues.
Regards,
Jaya
SIGN IN To post a reply.
- 8 Replies
- 2 Participants
-
SN Sherly Numawaty
- Jun 25, 2008 04:11 AM UTC
- Jul 7, 2008 07:22 AM UTC