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

drag and drop grouping does not work for GridTemplateColumn

2 Answers 247 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Curt Helland
Top achievements
Rank 1
Curt Helland asked on 27 Apr 2010, 04:45 PM
I have a grid bound to a sql data source. there are gridbound columns and gridtemplatecolumns. an example of each column is shown below. in this example, the drag and drop grouping will work for the AddressLine2 gridboundcolumn but not for the City gridtemplatecolumn.  As you can see, Groupable is set true and the template column has a GroupByExpression of City but when I drop it, no grouping occurs. what else do I need to do to make this work?

                        <telerik:GridBoundColumn DataField="AddressLine2" HeaderText="AddressLine2" SortExpression="AddressLine2" 
                            UniqueName="AddressLine2" AutoPostBackOnFilter="True"
                        </telerik:GridBoundColumn> 
                        <telerik:GridTemplateColumn HeaderText="City" DataField="City" SortExpression="City" 
                            Groupable="true" GroupByExpression="City" UniqueName="CityColumn" AutoPostBackOnFilter="True"
                            <EditItemTemplate> 
                                <telerik:RadComboBox ID="CityEditControl" runat="server" Skin="Web20" DataSourceID="lkpCities" 
                                    DataTextField="City" DataValueField="UID" SelectedValue='<%# Bind("lkpCitiesID")%>' 
                                    MarkFirstMatch="true" AppendDataBoundItems="true"
                                    <Items> 
                                        <telerik:RadComboBoxItem Text="Select" Value="0" /> 
                                    </Items> 
                                </telerik:RadComboBox> 
                            </EditItemTemplate> 
                            <ItemTemplate> 
                                <%#Eval("City")%> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 

2 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 29 Apr 2010, 01:52 PM
Hello Curt Helland,

I would suggest that you review the section titled "Tempalte columns" section in the following help article:

Declarative definition

I hope this helps,
Martin
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Shantanu
Top achievements
Rank 2
answered on 04 Jun 2013, 09:25 AM
Thanks a lot. The link really helps...

Just to reply to the answer straight away


GroupByExpression="Group By TitleID"

NOT 

GroupByExpression="TitleID"

also, you do not need to say
Groupable="true"
Its true by default. I hope it helps, Shantanu Chandra
Tags
Grid
Asked by
Curt Helland
Top achievements
Rank 1
Answers by
Martin
Telerik team
Shantanu
Top achievements
Rank 2
Share this question
or