Column reorder and row double click

Posted by: arulventhan.palanimuthu on 5 October 2017, 12:35 am EST

    • Post Options:
    • Link

    Posted 5 October 2017, 12:35 am EST

    Dear Sir/Mam,

    I need an column reorder and row double click. From the demo examples i found the following code(IMG) samples for Handler.

    and i use as function as like follows

    here i am getting null value on sender and args.

    When the action (reorder and double click) made following error occured

    i request you to help me how to add handlers for following functionalist

    1. Row Double Click
    2. Column Reordered
    3. Column Width Change
    4. Column header click

    Thanks ,

    Arulventhan NP

  • Posted 9 October 2017, 1:24 am EST

    Hello,

    Please have a look attached html sample to know how to work with Spread.Views events: .

    1. Row Double Click
    2. Column Reordered
    3. Column Width Change
    4. Column header click

    Thanks,

    Deepak SharmaEvent.zip

  • Posted 11 October 2017, 9:57 pm EST

    Row double click fires two times.

    its works fine at !postback.

    once postback occures the double click fires dual time to a function.first time it brings null data with all columns in args and second time it brings row’s orginal data.

    help me to come out of this error.

    thanks ,

    Arulventhan

  • Posted 13 October 2017, 2:36 am EST

    Hello,

    Could you please provide me your sample application to debug this further? I am not sure how exactly are you using the Spread.Views to cause a postback since it is a client side component.

    In the code given by me the RowDoubleClick fires only one time. It first fires the rowclick, rowDhClick and the editing event. Are you seeing a different sequence?

    Thanks,

    Deepak Sharma

  • Posted 19 October 2017, 11:57 pm EST

    Hello Deepak ,

    For RowDoubleClick i am using following steps.

    step 1 : Page Loads with default values.

    step 2: Data View bind.(Its an function with data view columns , data and rowdbclick handler)

    now i double click its works fine

    Step 3: after double click Popup open for that action.

    step 4: while close the popup,again i refresh data view(function at step 2 calls here).

    step 5 : now i use double click it fires more than one time.

    i think the problem was binding the grid.

    if i use dataView.invalidate(); instead of calling that function again the same error occurs.

    help me come out from this issue.

    Thanks,

    Arulventhan NP

  • Posted 25 October 2017, 3:04 am EST

    Hi Arul,

    I am not able to replicate this issue with the sample page attached. Please refer to the sameand test. Please provide me your sample application in case the issue still persists.

    Thanks,

    Deepak Sharma

    SPViewRowDoubleClickissue.zip

  • Posted 1 November 2017, 7:09 pm EST

    hello Deepak,

    Please find the code sample i used for the row double click as follows.

    
    var dataView;
     function GetGridData() {
     $scope.data=[
    {  data1:value01,data2:value02},
    {  data1:value11,data2:value12},
    {  data1:value21,data2:value22},
    {  data1:value31,data2:value32},
    ];
    var columns=[
    {}
    ];
     dataView = new GC.Spread.Views.DataView(document.getElementById('grid1'), $scope.data, columns,
                           new GC.Spread.Views.Plugins.GridLayout(
                           {
                               allowSorting: false,
                               showColHeader: true,
                               showRowHeader: false,
                               allowResizing: true,
                               selectionMode: 'single',
                               loadOnDemand: true,
                               showToolPanel: false,
                               allowColumnReorder: true,
                               allowCellMerging: true 
                           }));
     dataView["rowDbClick"].addHandler(rowDbClickFun);
    }
     window.rowDbClickFun = function (sender, args) {
     $mdDialog.show({
                            templateUrl: '/test.html',
                            controller: 'testCtrl',
                            disableParentScroll: true,
                            parent: angular.element(document.body),
                            targetEvent: sender,
                            multiple: true,
                            clickOutsideToClose: false,
                            fullscreen: $scope.customFullscreen,
                            resolve: {
                                postDataDetail: (function () {
                                    return {
                                        data1:value1,data2:value2
                                    };
                                })
                            }
                        }).then(function () { 
                            GetGridData();
    			//dataView.invalidate();
                            // location.reload();
                        });
    }
    
    
    

    in rowDbClickFun() popup opens.once the popup closed the ‘then’ function will took place.

    the grid refreshed again. now i double click the row it get into rowDbClickFun() more than once max of 25 times.Help me to solve this issue.

    if i use dataView.invalidate() same issue occured.

    if i use location.reload() the total page gets reload.Here just i need to reload the grid.By getting data from api or reload the only $scope.data of the grid .

    Thanks,

    Arulventhan NP

  • Posted 9 November 2017, 2:51 am EST

    Hello,

    Could you please provide me your complete application, using just the above code, I am not able to replicate the issue. When I use the location.reload() in RowDoubleClick event in a pureJS application everything seems to work fine. I would need to check if it is something specific to angularJS.

    Thanks,

    Deepak Sharma

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels