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

Problems / bug when grouping with GridViewComboBoxColumn

3 Answers 33 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 13 Nov 2011, 09:33 PM
Hi,

I have an editable RadGridView with a couple of GridViewComboBoxColumns defined.
I'm displaying a list of items from another table in these GridViewComboBoxColumns with the SelectedValueMemberPath being the rowID. Standard stuff. We're using RIA, EF and PRISM.

I have two problems...

[1] When I group by one of these GridViewComboBoxColumns, the group header is blank (not the group descriptor header on the grouping button, but the header for each group.. The grouping works ok. How do I make the header for each group show?

[2] When I drag the GridViewComboBoxColumns header to the group panel, the items in the combo are cleared. My code does not reload the ItemSource on grouping. It is only loaded in initialisation of the UserControl. Is this a bug?
When I ungroup, the GridViewComboBoxColumn ItemsSource is reloaded! I'm using version 2011.2.1107.1040.

Have you got examples using the EF and RIA and MVVM that proves this works? 

Thanks
Simon


3 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 14 Nov 2011, 08:21 AM
Hi Simon,

I have tried to reproduce the issues you reported, but unfortunately without any success. I am attaching the sample project I used for the test. Please take a look at it and let me know in case of any misunderstandings.

  

Kind regards,
Maya
the Telerik team

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

0
Simon
Top achievements
Rank 1
answered on 16 Nov 2011, 05:05 AM
Thanks Maja,

I managed to break it.
It appears that my problem relates to creating the group descriptor in XAML, combined with adding the following code on the Grid DataLoaded event.
<telerik:GroupDescriptor Member="ShipCity"
     DisplayContent="ContactName"
     SortDirection="Descending" />

private void grid_DataLoaded(object sender, System.EventArgs e)
{
    grid.ExpandAllGroups();
}

When this runs - you get a null reference exception. However with my solution which does not use the RadDomainDataSource controls, it does not throw this error.
However what it does do is cause problems with setting SelectedRow - on my ViewModel. If I manually remove the grouping then drag it to the group header, it all works fine!!

Hope you can provide a solution - we really need our groups to be expanded by default - a much nicer user experience.

Thanks 
Simon
0
Vlad
Telerik team
answered on 16 Nov 2011, 07:40 AM
Hi,

 Why not set AutoExpandGroups to True instead ExpandAllGroups()?

Greetings,
Vlad
the Telerik team

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

Tags
GridView
Asked by
Simon
Top achievements
Rank 1
Answers by
Maya
Telerik team
Simon
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or