PDA

View Full Version : [CLOSED] getRowsValues({selectedOnly:true}) return empty selection



gets_gui
Feb 25, 2013, 1:44 PM
Hi,

I used the PagingToolbar locally, and when I tried to use App.clientBlocksPanel.getRowsValues({selectedOnly: true}) on a grid with valid selection, and the function getRowsValues(selectedOnly) returns empty selection. It works fine without the PagingToolbar, can you please explain why, and suggest a work around?

Thanks.

Vladimir
Feb 25, 2013, 2:11 PM
Please post simple runnable sample reproduces the issue.

CPA1158139
Apr 06, 2013, 3:07 PM
Please post simple ruanble sample reproduces the issue

I came cross same question.

Baidaly
Apr 06, 2013, 6:37 PM
Hello!

I've checked with the following example and it works fine: http://examples2.ext.net/#/GridPanel/Paging_and_Sorting/Local_Data_Paging/

Can you provide your sample?

UnifyEducation
Dec 03, 2013, 10:13 AM
Hello!

I've checked with the following example and it works fine: http://examples2.ext.net/#/GridPanel/Paging_and_Sorting/Local_Data_Paging/

Can you provide your sample?

Hi, I have the same problem. If I remove BottomBar, it works fine. Is there anything I have to add to?
Here is the example:



@model dynamic

@{
Layout = null;
var datasource = new List<object>
{
new {Field1 = "Value1", Field2 = "Value2"},
new {Field1 = "Value3", Field2 = "Value4"},
};
}

@(Html.X().ResourceManager())

@(Html.X().GridPanel().ForceFit(true).ID("MyGrid").Height(400).Width(600)
.Store(Html.X().Store().PageSize(20)
.Model(Html.X().Model()
.Fields(f =>
{
f.Add(Html.X().ModelField().Name("Field1"));
f.Add(Html.X().ModelField().Name("Field2"));
})
)
.DataSource(datasource))
.ColumnModel(c =>
{
c.Add(Html.X().Column().DataIndex("Field1"));
c.Add(Html.X().Column().DataIndex("Field2"));
})
.SelectionModel(Html.X().CheckboxSelectionModel(). CheckOnly(true))
.BottomBar(Html.X().PagingToolbar().DisplayInfo(tr ue)
.Plugins(Html.X().ProgressBarPager()))
)

Daniil
Dec 03, 2013, 12:29 PM
Hi,

To get it working across the pages, you have to use a Model's IDProperty. I.e. provide a ModelField with unique ids for records.

UnifyEducation
Dec 03, 2013, 12:37 PM
Hi,

To get it working across the pages, you have to use a Model's IDProperty. I.e. provide a ModelField with unique ids for records.

Thank you for your help. :-)