To loop GridPanel rows server side

  1. #1

    To loop GridPanel rows server side

    hi,

    I want to loop between gridpanel rows. but not being
    example

    Asp.NET
                foreach (GridViewRow row in GridView1.Rows)
                {
                    bool value = ((CheckBox)(row.Cells[8].Controls[0])).Checked;
                }
    Ext.NET

    ????
    Last edited by Daniil; Jun 28, 2012 at 12:28 AM. Reason: Please use [CODE] tags
  2. #2
    Hi,

    There are no controls, there is just raw HTML.

    Please follow:
    http://forums.ext.net/showthread.php?10705
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi,

    There are no controls, there is just raw HTML.

    Please follow:
    http://forums.ext.net/showthread.php?10705
    But i will says
    there is Dropdown in your 6.row. It take get choose in here (all for each row)

    but i don't want loop in store. i don't want loop for data. i want loop in grid columns
  4. #4
    Quote Originally Posted by nanomusty View Post
    but i don't want loop in store. i don't want loop for data. i want loop in grid columns
    You could loop
    GridPanel1.ColumnModel.Columns
    But I don't think you need that.

    Please clarify the initial requirement. What exactly are you trying to achieve?
  5. #5
    Last edited by geoffrey.mcgill; Mar 07, 2013 at 9:38 AM.
  6. #6

    loop Grid

    I don't think you can do it with a gridpanel.

    The way I did it is by reading it in a array in javascript and then callinn a directmethod.

    Javascript

    var cell = new Array();
    for (var i = 0, len = grid.getSelectionModel().selections.length; i < len; i++) {
        cell[i] = grid.getSelectionModel().selections.items[i].data.SelNommer;
    }
    Ext.net.DirectMethods.gridloop(cell, {
        success: function(result) {
    
    
        },
    
    
        failure: function(errorMsg) {
            Ext.Msg.alert('Failure', errorMsg);
        },
        eventMask: { showMask: true, minDelay: 100, msg: "Sending SMS's" }
    });
    Serverside code sorry it is vb

     <Ext.Net.DirectMethod()> _
       Public Function gridloop(ByVal lstCell As ArrayList) As String
      For i = 0 To lstCell.Count - 1
    dim answer as string
    answer = lstCell(i).ToString
    Next
    end function
    hope it helps
  7. #7
    Quote Originally Posted by Richardt View Post
    I don't think you can do it with a gridpanel.

    The way I did it is by reading it in a array in javascript and then callinn a directmethod.

    Javascript

    var cell = new Array();
    for (var i = 0, len = grid.getSelectionModel().selections.length; i < len; i++) {
        cell[i] = grid.getSelectionModel().selections.items[i].data.SelNommer;
    }
    Ext.net.DirectMethods.gridloop(cell, {
        success: function(result) {
    
    
        },
    
    
        failure: function(errorMsg) {
            Ext.Msg.alert('Failure', errorMsg);
        },
        eventMask: { showMask: true, minDelay: 100, msg: "Sending SMS's" }
    });
    Serverside code sorry it is vb

     <Ext.Net.DirectMethod()> _
       Public Function gridloop(ByVal lstCell As ArrayList) As String
      For i = 0 To lstCell.Count - 1
    dim answer as string
    answer = lstCell(i).ToString
    Next
    end function
    hope it helps
    Thank you. yes it was be :)
  8. #8
    You also might be interested to look at the following examples how to submit the selection.
    http://examples1.ext.net/#/GridPanel...box_Selection/
    http://examples1.ext.net/#/GridPanel...itting_Values/

Similar Threads

  1. Replies: 15
    Last Post: Sep 12, 2012, 1:46 PM
  2. Replies: 0
    Last Post: May 22, 2012, 5:39 PM
  3. [CLOSED] Loop control Client Side
    By majunior in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: May 13, 2011, 7:08 PM
  4. Replies: 1
    Last Post: May 05, 2010, 1:47 PM
  5. Loop through TreePanel Nodes in Server Side
    By fernando6 in forum 1.x Help
    Replies: 0
    Last Post: Jun 01, 2009, 3:51 PM

Posting Permissions