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

[Solved] disabling user created groups causes wrong column layout

4 Answers 96 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Keivan Beigi
Top achievements
Rank 1
Keivan Beigi asked on 23 Oct 2010, 08:16 PM
defining groups specifically in markup and disabling user created grouping (Enabled(false)) cause the columns to render incorrectly.

.Groupable(grouping => grouping.Groups(groups => groups.Add(c => c.SeasonNumber)).Enabled(false))


Full grid definition:
<%Html.Telerik().Grid(Model.Episodes).Name("episodes")
                      .Columns(columns =>
                                   {
                                       columns.Bound(c => c.EpisodeNumber).Width(10);
                                       columns.Bound(c => c.Title);
                                       columns.Bound(c => c.AirDate).Format("{0:d}").Width(150);
                                   })
                      .DetailView(detailView => detailView.Template(e => Html.RenderPartial("EpisodeDetail", e)))
                      .Groupable(grouping => grouping.Groups(groups => groups.Add(c => c.SeasonNumber)))
                      .Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber)).Enabled(false)).Render();
%>

what i'm trying to achieve is have grouping while not allowing the user to change the groups.
I have attached screen shots that show the problem.

4 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 25 Oct 2010, 10:57 AM
Hello Keivan,

I'm afraid that the scenario in question is currently not supported. However can you please provide a bit more details on exact functionality you are looking for. Do you want just to hide the grouping panel and keep the groups expand/collapse functionality?

Regards,
Rosen
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
Keivan Beigi
Top achievements
Rank 1
answered on 25 Oct 2010, 05:21 PM
yes, your assumption is correct. what I 'm trying to achieve is to define groups programatically without alowing the user to change the groups or define new groups. basically read-only grouping.
0
Rosen
Telerik team
answered on 26 Oct 2010, 07:11 AM
Hello Keivan, 

The easiest way to hide the group panel will be by adding the following css to the page:

<style type="text/css">
    .t-grouping-header
    {
        display:none;
    }
</style>

You can also set columns, to disable dragging them, using Groupable method.


Regards,
Rosen
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
Luis Velez
Top achievements
Rank 1
answered on 26 Oct 2010, 06:01 PM
Thanks, this was helpful.
Tags
Grid
Asked by
Keivan Beigi
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Keivan Beigi
Top achievements
Rank 1
Luis Velez
Top achievements
Rank 1
Share this question
or