How to add 2 DirectEvents in a gridpanl row

  1. #1

    How to add 2 DirectEvents in a gridpanl row



    I used "Custom Window with Record Details (AJAX Version)" example for creating the grid panel, i need to add a second button in the example with a different direct event method

  2. #2

    RE: How to add 2 DirectEvents in a gridpanl row

    this is the script i edited how can i call another direct method in second method(here both calls same function)
    <script type="text/javascript">                
            var employeeDetailsRender = function () {
                return '<img class="imgEdit" ext:qtip="Click to view/edit additional details" style="cursor:pointer;" src="vcard_edit.png" />';
            };
            var employeeDetailsRender1 = function() {
                return '<img class="imgEdit1" ext:qtip="Click to view/edit additional details" style="cursor:pointer;" src="vcard_edit.png" />';
            };
            var cellClick = function(grid, rowIndex, columnIndex, e) {
                var t = e.getTarget(),
                    record = grid.getStore().getAt(rowIndex),  // Get the Record
                    columnId = grid.getColumnModel().getColumnId(columnIndex); // Get column id
                
                if (t.className == "imgEdit" &amp;&amp; columnId == "ItemID") {
                    //the ajax call is allowed
                    return true;
                }
                if (t.className == "imgEdit1" &amp;&amp; columnId == "CategoryID") {
                    //the ajax call is allowed
                    return true;
                }
                //forbidden
                return false;
            };
        </script>

Similar Threads

  1. Concurrent DirectEvents
    By thedarklord in forum 1.x Help
    Replies: 1
    Last Post: Apr 15, 2011, 8:39 AM
  2. Dynamic DirectEvents
    By Dominik in forum 1.x Help
    Replies: 3
    Last Post: Jul 30, 2010, 12:58 PM
  3. how to refresh gridpanl'sRowSelectionModel
    By wonderful_ecode in forum 1.x Help
    Replies: 1
    Last Post: Feb 08, 2010, 8:03 AM
  4. Replies: 3
    Last Post: Jun 17, 2009, 10:32 AM
  5. ComboBox Bug in GridPanl Toolbar
    By EzaBlade in forum Bugs
    Replies: 0
    Last Post: Mar 24, 2009, 10:39 AM

Posting Permissions