This is a migrated thread and some comments may be shown as answers.

[Solved] Combobox

1 Answer 105 Views
Grid
This is a migrated thread and some comments may be shown as answers.
AereoN
Top achievements
Rank 1
AereoN asked on 05 Dec 2009, 12:30 AM
Hi,
I wanted to have 2 column in a grid; one is a combobox control while the other one is just text.
There is 2 button outside of the grid that is "Add" and "Remove".
When the user clicks "Add", it will generate one row in the grid that allows the user to select.
When the user selects a selection in the combobox in the 1st column, the 2nd column will also be changed accordingly to the selection.

My question is:
1) How do I bind the data in the combobox in the grid?
2) How do I achieve the ability to change the 2nd column according to the combobox selection?

Additional note: The databinding is occurred in code behind.
When user clicks "Add", a new row will be created and the default selection is "<<Select>>".

Can someone please enlighten me about this?
Thanks.

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 10 Dec 2009, 08:09 AM
Hello AereoN,

 Thank you for contacting us and for your question.
One possible option in this case is like this. You can use a custom datasoure/datatable which will provide data for the grid. When a selection is made, you can postback, alter the relevant field(s) in the database, and rebind the grid. This will cause the new value to be populated properly.
Give this suggestion a try and let me know how it meets your requirements, and if any other questions arise.

Regards,

Yavor
the Telerik team

 


Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
AereoN
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or