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

Problem in GridviewComboboxColumn

5 Answers 132 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Chetan
Top achievements
Rank 1
Chetan asked on 01 Dec 2010, 04:13 PM

Hello Telerik,

i need to show RadGridview inside Gridcomboboxcolumn.

Is it possible?

I refered the following link - http://blogs.telerik.com/vladimirenchev/posts/10-04-09/how_to_filter_as_you_type_radgridview_inside_radcombobox_for_wpf_and_silverlight.aspx 

but problem is if i use combobox inside girdviewcolumn then not able to get selected items in code behind.

pls help me to solve out my problem. Its very urgent.

thnks
Csingh


5 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 01 Dec 2010, 04:33 PM
Hello Chetan,

RadGridView is a heavy control . I would definitely not recommend to nest it in the cell of a column in another RadGridView.

If I understand the use case correctly - you are in need of multicolumn combo box in the cell  ?

Please share a bit more details about your scenario . I am sure we can think of a better way.

All the best,
Pavel Pavlov
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Chetan
Top achievements
Rank 1
answered on 02 Dec 2010, 06:25 AM
Hello Pavel,

Scenario is,  i have one Grid which is having some columns along with one GridViewComboBoxColumn. When user select GridcomboBox then it will show combobox displaymember in such manner that user can sort them. User should able to sort comobobx items as per other fields which are inside that combobox template(having more then one field). To understand please refer attached screenshot. Its having one Gridcombobox inside that there is one grid which is having 3 columns. while selecting records user can short nested grid columns.

please check and let me know how its possible. If grid is not possible then give me some idea to perform above operation.

waiting for your reply.


thanks
Csingh

0
Pavel Pavlov
Telerik team
answered on 02 Dec 2010, 02:10 PM
Hello Chetan,

Ok , you have mentioned you will need sorting , so indeed we will need a RadGridView inside the cell .

So the approach would be :
Place a RadComboBox in the cell edit template of a GridViewComboBox column.

You can then use the approach given at http://blogs.telerik.com/vladimirenchev/posts/10-04-09/how_to_filter_as_you_type_radgridview_inside_radcombobox_for_wpf_and_silverlight.aspx
to place the RadGridView inside the combo box.

Let me know in case you find any difficulties while implementing this approach.

Kind regards,
Pavel Pavlov
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Chetan
Top achievements
Rank 1
answered on 06 Dec 2010, 05:30 PM
Hello paval,

how to access that combobox selected values in grid_cellvalidating, grid_rowvalidating, row_edited events?


thanks
csingh
0
Pavel Pavlov
Telerik team
answered on 07 Dec 2010, 10:02 AM
Hi Chetan,

The good approach would be to bind the selected value or the selected item of the combo box to a property of the business object relevant to the row.

Still you can access the selected value in the mentioned event handlers the following way :
The ChildrenOfType extension method ( resides in Telerik.Windows.Controls namespace)  can help you get a reference to the combo. Something like :

Row.ChildrenOfType<RadComboBox>().FirstOrDefault().SelectedValue
*assuming it is the first combo in the row.

Regards,
Pavel Pavlov
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
GridView
Asked by
Chetan
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Chetan
Top achievements
Rank 1
Share this question
or