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

Initial group when binding to a table

2 Answers 107 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard Wilde
Top achievements
Rank 1
Richard Wilde asked on 20 Aug 2012, 08:50 AM
Is it possible to set an initial group when binding to an existing HTML table? I have tried setting the group field in the datasource.

<asp:Repeater runat="server" ID="repList" EnableViewState="False">
    <HeaderTemplate><table id="grid">
    <thead>
    <tr>
        <th data-field="ShortName">Short Name</th>
        <th data-field="Site">Site</th>
    </tr>
    </thead>
    <tbody>
    </HeaderTemplate>
    <ItemTemplate>
        <tr>
            <td><%#Eval("ShortName")%></td>
            <td><%#Eval("tblSite.Site")%></td>
        </tr>
    </ItemTemplate>
    <FooterTemplate></tbody></table></FooterTemplate>
</asp:Repeater>
 
 
<script type="text/javascript">
    $(function () {
        $('#grid').kendoGrid({
            datasource : { group: {field: "Site"}},
            groupable: true,
            scrollable: true,
            sortable: true,
            pageable: true,
            filterable: true
        });
    });
</script>

2 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 23 Aug 2012, 08:24 AM
Hi Richard,

Thank you for contacting us.

I have tested grouping when binding to an existing HTML table, and on our side everything is working as expected. Please check this working JsFddle example. If you still have problems, it will be very helpful for us if you can reproduce your issue and send the updated fiddle back to us.

Kind regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Richard Wilde
Top achievements
Rank 1
answered on 23 Aug 2012, 12:10 PM
Thanks, not sure why it didn't work for me first time! Fine now, thanks again for your help.
Tags
Grid
Asked by
Richard Wilde
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Richard Wilde
Top achievements
Rank 1
Share this question
or