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

GridViewComboBoxColumn not showing info in the grid

10 Answers 71 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Eduardo Blumenfeld
Top achievements
Rank 1
Eduardo Blumenfeld asked on 13 Apr 2012, 06:09 PM
Hi all,

The comboboxcolumn is not showing the info from the linked table:
this is the code snippet I'm using to define the column

column = GridViewComboBoxColumn.new()
column.DataMemberBinding = bind
column.UniqueName = colname
column.IsComboBoxEditable = true
column.ItemsSource = data_table_source.DefaultView
column.DisplayMemberPath = "name"
column.SelectedValueMemberPath = "id"
# add the column to the datagrid
raddatagrid.Columns.Add(column)

I can edit the column and the combobox appears populated in full, but as soon as I select an item the view doesn't show the result.

Any suggestions?

I'm using IronRuby, I can make it work as expected with the WPF .net 4.0 DataGrid without any problem.

Regards

Eduardo

10 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 16 Apr 2012, 02:27 PM
Hello,

 A possible reason for such a behaviour would be if your bound data and your selected data are of different type. What is the type of the bound data and what is the type of the "id"?

Greetings,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Eduardo Blumenfeld
Top achievements
Rank 1
answered on 16 Apr 2012, 07:00 PM
Hi,
Thank you for the quick response

The types for "id" and the grid are int (integer).

Regards,

Eduardo
0
Dimitrina
Telerik team
answered on 17 Apr 2012, 12:56 PM
Hello,

 All seems to be fine then. You state that "with the WPF .net 4.0 DataGrid" this code works fine. Can you please explain in details the code related to the DataGrid and the code related to the GridView? Probably there are some differences.

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Eduardo Blumenfeld
Top achievements
Rank 1
answered on 17 Apr 2012, 02:36 PM
Hi Didie:

here is the DataGrid snippet that is working presently, using the default wpf DataGrid Control:
column = DataGridComboBoxColumn.new()
column.SelectedValueBinding = bind
column.ItemsSource = data_table_source.DefaultView
column.DisplayMemberPath = "name"
column.SelectedValueMemberPath = "id"
# add the column to the datagrid
datagrid.Columns.Add(column)

As you can see it is exactly equivalent to the gridviewcomboboxcolumn approach, except for the setting of the UniqueName and IsComboBoxEditable and using SelectedValueBinding instead of DataMemberBinding.

Thank you in advance

Eduardo.


0
Dimitrina
Telerik team
answered on 17 Apr 2012, 02:59 PM
Hi,

 May I ask you to check the Ouput for binding errors?

If you not have binding errors, then another question is what is the 'bind' in

column.DataMemberBinding = bind

I would be better if you can share how your bound data object is defined.

All the best,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Eduardo Blumenfeld
Top achievements
Rank 1
answered on 17 Apr 2012, 03:24 PM
Sorry for not putting the code for bind, here it is (same for RadDataView and DataGrid):
bind = Binding.new(column_name)

It is just a standard.
0
Eduardo Blumenfeld
Top achievements
Rank 1
answered on 20 Apr 2012, 04:44 PM
Is there any way of solving this?

Regards,

Eduardo Blumenfeld

PS: this problem is in some way a showstopper for the use of the control.

0
Dimitrina
Telerik team
answered on 21 Apr 2012, 09:35 AM
Hello,

 I do not see any problem in your code and I am not able to reproduce such at my place. Would it be possible for you to send us a simple project that we can debug?

Greetings,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Eduardo Blumenfeld
Top achievements
Rank 1
answered on 23 Apr 2012, 12:11 AM
Hi Didie:

Thank you for the follow-up.

Did I mention that I'm using IronRuby?

The code I sent you is the actual code I'm using.
It makes heavy use of the dynamic capabilities of IronRuby.
(and it certainly works with the default DataGrid in the exact way
I sent you)

Regards,

Eduardo
0
Dimitrina
Telerik team
answered on 23 Apr 2012, 11:45 AM
Hi Eduardo,

I know that you use IronRuby, but just on that code we are not able to figure out what the problem would be. Although the IronRuby is not among our supported languages, we will de our best to check the issue.

 A similar problem was troubleshooted at this online article. As all of the reasons there is not valid for your case, then we will need a project. 

All the best,

Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Eduardo Blumenfeld
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Eduardo Blumenfeld
Top achievements
Rank 1
Share this question
or