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

Grid / Checkbox selection in Grid in ClientDetailTemplate

1 Answer 48 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Cédric
Top achievements
Rank 1
Cédric asked on 01 Mar 2018, 08:06 AM

Hello,

I am trying to implement the Grid / Checkbox selection feature in a grid which is inside a ClientDetailTemplate.

But I am in face of a disturbing issue since the selection is always done in the grid which belongs to the first detail template.

To be clear suppose that we have 2 master grids and 2 childs in their own detail template. Expand both the details of the 2 master grids. Then try to select all the rows of the 2nd nested grid by checking the header. The result is not the expected one because all the rows of the 1st nested grid are selected.

 

Hereafter my shortened view code:

@(Html.Kendo().Grid<SellerViewModel>()                           

    .Name("SellersGrid")

    .Columns(columns =>

    {

                 columns.Bound(p => p.SellerId).Hidden();

                 columns.Bound(e => e.Name);

)

                          .Events(e =>                           {                               e.DataBound("onHostSellersDataBound");                           })                           .Filterable()                           .Pageable(pager => pager.ButtonCount(3))                           .Editable(editable => editable.Mode(GridEditMode.InCell))                           .Sortable(sortable => sortable                               .AllowUnsort(true)                               .SortMode(GridSortMode.MultipleColumn))                           .ClientDetailTemplateId("marketplaces_template")                           .DataSource(dataSource => dataSource                               .Ajax()                               .Read(read => read.Action("GetHostSellers", "CompetitorGroup", new { competitorGroupId = Model.CompetitorGroupId }))                               .Sort(sort => sort.Add("IsSelected").Descending())                               .PageSize(25)                               .Model(model =>                               {                                   model.Id(p => p.UniqueId);                                   model.Field(p => p.SellerId).Editable(false);                                   model.Field(p => p.IsSelected).Editable(true);                                   model.Field(p => p.Name).Editable(false);                                   model.Field(p => p.IsActive).Editable(false);                               })                               .ServerOperation(false))                     )

1 Answer, 1 is accepted

Sort by
0
Preslav
Telerik team
answered on 02 Mar 2018, 01:42 PM
Hi Cédric,

In case anyone from the community encounters the same problem, I am linking the other forum on the same topic:

Regards,
Preslav
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Cédric
Top achievements
Rank 1
Answers by
Preslav
Telerik team
Share this question
or