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

Grouping disabled by default - what am I doing wrong?

2 Answers 75 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Anders
Top achievements
Rank 1
Anders asked on 24 Feb 2011, 03:33 PM
Hi all,

I'm using the grid and would like to be able to group by all columns - I've had it working but it stopped working and I can't figure out why...

To be specific, the grid shows up just fine, but when I try to drag I just get the 'forbidden' symbol over the top area.

I've tried to set IsGroupable=true (even if it's supposed to be default), but it doesn't change anything.

Below is my xaml - any clues?

Thanks,

Anders, Denmark

 <Grid>
        <telerik:RadGridView AutoGenerateColumns="False" x:Name="grid" SelectionMode="Extended" ItemsSource="{Binding CombinationMembers}" Margin="0,0,0,37">
            <telerik:RadGridView.Columns>
                <telerik:GridViewSelectColumn />
                <telerik:GridViewDataColumn Header="Item Parent" DataMemberBinding="{Binding Path=ViewModelBase.ParentItemContext, Mode=OneWay}"  />
                <telerik:GridViewDataColumn Header="Item" DataMemberBinding="{Binding Path=ViewModelBase.DisplayName,Mode=OneWay}"  />
                <telerik:GridViewDataColumn Header="Type" DataMemberBinding="{Binding Path=ViewModelBase.DisplayType,Mode=OneWay}" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
        <telerik1:RadButton Content="_Cancel" Height="Auto" HorizontalAlignment="Right" Margin="0,0,53,12" VerticalAlignment="Bottom" IsCancel="True" />
        <telerik1:RadButton Content="_Select" Height="Auto" HorizontalAlignment="Right" Margin="0,0,12,12" VerticalAlignment="Bottom" Command="{Binding App}" Click="RadButton_Click" />
    </Grid>

2 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 24 Feb 2011, 07:46 PM
Hello Anders,

 

I tried to replicate you problem, but with no avail. Can you please share with us the source code you are currently using?  In addition to this you can send us a small application where we can see the complete source code and to provide you with an appropriate soluion. Any additional information will be highly appreciated as well.


Greetings,
Vanya Pavlova
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Anders
Top achievements
Rank 1
answered on 25 Feb 2011, 08:11 AM
My problem is solved.

I exposed the propeties on the collection item that I bind to (while before I bound to property on an object referenced by the collection item). While it was valid before, it seems this approach is better understood by the control. And perhaps better coding style as weel...

        <telerik:RadGridView AutoGenerateColumns="False" x:Name="grid" SelectionMode="Extended" ItemsSource="{Binding CombinationMembers}" Margin="0,0,0,37">
            <telerik:RadGridView.Columns>
                <telerik:GridViewSelectColumn />
                <telerik:GridViewDataColumn Header="Item Parent" DataMemberBinding="{Binding ParentItemContext}" />
                <telerik:GridViewDataColumn Header="Item" DataMemberBinding="{Binding DisplayName}" />
                <telerik:GridViewDataColumn Header="Type" DataMemberBinding="{Binding DisplayType}" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
Tags
GridView
Asked by
Anders
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Anders
Top achievements
Rank 1
Share this question
or