how can read Specified column or All the columns of checked SelectionModel in Grid

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    how can read Specified column or All the columns of checked SelectionModel in Grid

    hi
    I'm going to get the value of all the checked rows in the Grid. I followed this example https://mvc.ext.net/#/GridPanel_Spreadsheet/Submit/
     .SelectionModel(
                  Html.X()
                      .CheckboxSelectionModel().ID("Model1")
                      .Mode(SelectionMode.Multi)
    
              )
    and
    .DirectEvents(de =>
                          {
                              de.Click.Action = "Submit";
                              de.Click.EventMask.ShowMask = true;
                              de.Click.ExtraParams.Add(new Parameter()
                              {
                                  Name = "selection",
                                  Value= "App.Model1.getSubmitData({ excludeId: true })" ,
                                  Mode = ParameterMode.Raw  
                              });
                          }) )
    but js error occurs With this theme : "Uncaught TypeError: App.Model1.getSubmitData is not a function"
    i think getSubmitData only work for SpreadsheetSelectionModel but i have a CheckboxSelectionModel
    is it possible someone give me a sample for getting value of checked row of grid in viewpage for using in codebehiend
    Last edited by TAYMA; Feb 13, 2019 at 1:28 PM.
  2. #2
    no support?
  3. #3
    Hello @TAYMA, and welcome to Ext.NET forums!

    Sorry for the delay replying your inquiry.

    The method you got from the example you pointed, getSubmitData() is a client-side method specific for the Ext.grid.selection.SpreadsheetModel (server-side class SpreadsheetSelectionModel), and an implementation specific to Ext.NET.

    You are trying to call it in a Ext.grid.Selection.CheckboxModel (server-side class CheckboxSelectionModel); that's not going to work, because it does not implement that client-side (javascript) method.

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. [CLOSED] Read all checked nodes in treepanel by code_behind
    By ucaneto in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Dec 02, 2014, 8:32 PM
  2. Replies: 4
    Last Post: Nov 18, 2014, 10:53 AM
  3. [CLOSED] Read selected items server side (additional columns)
    By CanopiusApplications in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Jul 30, 2014, 6:18 AM
  4. Replies: 2
    Last Post: Oct 14, 2011, 6:12 PM
  5. Replies: 0
    Last Post: Sep 22, 2011, 8:37 AM

Posting Permissions