This question is locked. New answers and comments are not allowed.
I'm making a program containĂng several comboboxes, all linked to a sql database through a tableadapter. The problem is that when i change the index in one of the of the comboboxes they all change indexes.
Does anyone have any idea as to why this happends?
Does anyone have any idea as to why this happends?
4 Answers, 1 is accepted
0
Espen
Top achievements
Rank 1
answered on 28 Jan 2008, 02:00 PM
This is just a wild stab in the dark, but are the datasources for the comboboxes hooked up to the same instance of the table(s) in use?
In other words :
DataTable dt = adapter.GetData();
cbo1.DataSource = dt;
cbo2.DataSource = dt;
If so it migth work if you do :
cbo1.DataSource = adapter.GetData();
cbo2.DataSource = adapter.GetData();
In other words :
DataTable dt = adapter.GetData();
cbo1.DataSource = dt;
cbo2.DataSource = dt;
If so it migth work if you do :
cbo1.DataSource = adapter.GetData();
cbo2.DataSource = adapter.GetData();
0
Hello Allan,
I am not sure what is your exact scenario, but (as Espen has already mentioned), if the comboboxes are attached to the same data source it is possible indices to be synchronized automatically. In fact, databinding mechanism and particulary CurrencyManager implement exactly this behavior (see: http://msdn2.microsoft.com/en-us/library/system.windows.forms.bindingcontext.aspx).
If you have any other questions regarding RadComboBox, please do not hesitate to write us.
Kind regards,
Georgi
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
I am not sure what is your exact scenario, but (as Espen has already mentioned), if the comboboxes are attached to the same data source it is possible indices to be synchronized automatically. In fact, databinding mechanism and particulary CurrencyManager implement exactly this behavior (see: http://msdn2.microsoft.com/en-us/library/system.windows.forms.bindingcontext.aspx).
If you have any other questions regarding RadComboBox, please do not hesitate to write us.
Kind regards,
Georgi
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Allan
Top achievements
Rank 1
answered on 02 Jun 2008, 07:47 AM
Sorry for the late reply. But the solution worked, problem solved.
tnx...
tnx...
0
Hi Allan,
I am glad to hear that the issue is now resolved.
If you need additional assistance, do not hesitate to contact me.
Sincerely yours,
Nikolay
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
I am glad to hear that the issue is now resolved.
If you need additional assistance, do not hesitate to contact me.
Sincerely yours,
Nikolay
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center