1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    18
    Vote Rating
    0
    charan@dev.com is on a distinguished road

      0  

    Thumbs up Unanswered: jQuery Sortable in extjs....?

    Unanswered: jQuery Sortable in extjs....?


    Can any one help me out in solving this?

    I have a grid with list of elements which are draggable and droppable to another grid.

    In Addition to this, I want the same grid elements to be dragged up and down.

    (Like Sortable() in jQuery)

    Is it possible?


    I am a newbie to Extjs. Need to use this Extjs in my Salesforce VF Pages. Help me put at earliest!!

  2. #2
    Sencha - Services Team arthurakay's Avatar
    Join Date
    Sep 2008
    Location
    Antioch, IL
    Posts
    1,348
    Answers
    60
    Vote Rating
    32
    arthurakay is a jewel in the rough arthurakay is a jewel in the rough arthurakay is a jewel in the rough

      0  

    Default


    Check the API docs on the grid plugin "DragDrop". The example in there is exactly what you want, I think.

    http://docs.sencha.com/ext-js/4-0/#!...lugin.DragDrop
    Arthur Kay
    Developer Relations Manager, Sencha Inc.

    Twitter | Sencha Chicago User Group

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    18
    Vote Rating
    0
    charan@dev.com is on a distinguished road

      0  

    Default


    Thanx for your quick reply buddy!!

    I am using this... where am I going wrong. Please correct me.


    // Generic fields array to use in both store defs.
    var fields = [
    {name: 'name', mapping : 'name'}
    ];

    // create the data store
    var firstGridStore = new Ext.data.JsonStore({
    fields : fields,
    data : myData,
    root : 'records'

    });

    // Column Model shortcut array
    var cols = [
    {id : 'name', header: "Requirement Name", width: 200, sortable: true, dataIndex: 'name',flex:true}
    ];

    // declare the source Grid
    var firstGrid = new Ext.grid.GridPanel({
    ddGroup : 'secondGridDDGroup',
    store : firstGridStore,
    columns : cols,
    enableDragDrop : true,
    stripeRows : true,
    autoExpandColumn : 'name',
    width : 400,
    region : 'west',
    title : 'Phase 1',
    viewConfig: {
    plugins: {
    ptype: 'gridviewdragdrop',
    dragText: 'Drag and drop to reorganize'
    }
    }

    });

Thread Participants: 1

Tags for this Thread