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

  1. #1

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

    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.
    Last edited by Daniil; Dec 03, 2013 at 12:41 PM. Reason: [CLOSED]
  2. #2
    Please post simple runnable sample reproduces the issue.
    Last edited by Daniil; Apr 08, 2013 at 5:52 AM.
  3. #3
    Quote Originally Posted by Vladimir View Post
    Please post simple ruanble sample reproduces the issue
    I came cross same question.
  4. #4
    Hello!

    I've checked with the following example and it works fine: https://examples2.ext.net/#/GridPane...l_Data_Paging/

    Can you provide your sample?
  5. #5
    Quote Originally Posted by Baidaly View Post
    Hello!

    I've checked with the following example and it works fine: https://examples2.ext.net/#/GridPane...l_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(true)
                             .Plugins(Html.X().ProgressBarPager()))
                         )
  6. #6
    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.
  7. #7
    Quote Originally Posted by Daniil View Post
    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. :-)

Similar Threads

  1. Replies: 1
    Last Post: Mar 27, 2012, 2:37 PM
  2. Replies: 0
    Last Post: Nov 02, 2011, 8:34 AM
  3. [CLOSED] Checkbox return true/false
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 04, 2011, 5:42 AM
  4. Replies: 6
    Last Post: Jan 11, 2011, 3:38 PM
  5. Checkbox selection model + getRowsValues
    By Birgit in forum 1.x Help
    Replies: 10
    Last Post: Sep 06, 2010, 5:12 PM

Tags for this Thread

Posting Permissions