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

Always Display Group Message

1 Answer 74 Views
Grid
This is a migrated thread and some comments may be shown as answers.
kirelet
Top achievements
Rank 2
kirelet asked on 25 Mar 2014, 04:17 PM
I am using the grouping function of the Grid.  I would like to display the "Drag a column header and drop it here to group by that column" message always, not just when there is no grouping, because I have one column that is grouped by default when the page loads, and the user still needs to know how it works.  Is there a way to have this message displayed always?

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimiter Madjarov
Telerik team
answered on 25 Mar 2014, 05:11 PM
Hello A J,

There is no built in way to achieve this, but it could be done manually. For example you could bind to the dataBound event of the Grid, check if there are any groups and prepend the text to the grouping header.
E.g.
.Events(e => e.DataBound("dataBound"))

function dataBound() {
    var that = this;
 
    setTimeout(function () {
        if (that.dataSource.group().length > 0) {
            that.wrapper.find(".k-grouping-header").prepend("Drag a column header and drop it here to group by that column");
        }
    });
}

I wish you a great day!

Regards,
Dimiter Madjarov
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
Tags
Grid
Asked by
kirelet
Top achievements
Rank 2
Answers by
Dimiter Madjarov
Telerik team
Share this question
or