Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a table in a div with left margin:
HTML
<div  id="Div1" style="${fixedStyle}">
        <div class="tblOuter" id="Div2" style="z-index: 1000;bottom: auto; overflow:hidden;">
            <div class="tblInner" id="Div3" style="overflow:hidden;">
                <table id="Table1" class="fixedColumn">
                    <thead>
                        <tr>
                            <th>&nbsp;</th>
                            <th>A</th>
                            <th>B</th>
                            <th>C</th>
                            <th>D</th>
                            <th>E</th>
                            {{tmpl($value) "#myDynamicColumn"}}  
                            <th>&nbsp;</th>
                            <th style="width: 100%;">&nbsp;</th>
                        </tr>
                    </thead>
                </table>
            </div>
        </div>
        <div class="tblOuter" id="Div4" style="z-index: 10;">
            <div class="tblInner" id="Div5">
                <table id="Table2" class="fixedColumn">
                    <thead>
                        <tr>
                            <th>&nbsp;</th>
                            <th>A</th>
                            <th>B</th>
                            <th>C</th>
                            <th>D</th>
                            <th>E</th>
                            {{tmpl($value) "#myDynamicColumn"}}  
                            <th>&nbsp;</th>
                            <th style="width: 100%;">&nbsp;</th>
                        </tr>
                    </thead>
                //<tbody id='tbody1'></tbody>
                    <tbody><tr>
                            <th>&nbsp;</th>
                            <th>A</th>
                            <th>B</th>
                            <th>C</th>
                            <th>D</th>
                            <th>E</th>
                            {{tmpl($value) "#myDynamicColumn"}}  
                            <th>&nbsp;</th>
                            <th style="width: 100%;">&nbsp;</th>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>


I want to implement this "requirement"

Plus, I am implementing the jquery sortable.

JavaScript
$(tableBody).sortable("destroy"); //Remove soratable plugin if already applied.
            $(tableBody).sortable({
                placeholder: 'ui-state-highlight',
                items:'tr.sortable-row',
                update: function (event, ui) {
                   
                },
                helper: function (e, ui) {
                    
                },
                start: function (event, ui) {
                  
                },
                forceHelperSize: true,
                forcePlaceholderSize: true
            }).disableSelection();


* Now my issue is As I have given "
HTML
tr.sortable-row

" to items:options.
While dragging the row half "non-freeze" column is only dragging. :(

What I have tried:

i have tried to set the item "selector" by replacing its margin-left: -400px(as i have given earlier).
couldn't able to set.
Posted
Updated 1-Mar-16 16:28pm
v2
Comments
John C Rayan 1-Mar-16 8:59am    
where is your 'tr.sortable-row' ?
what do you mean by items:options? where are the options elements?
Bikram Chhetri 1-Mar-16 22:33pm    
1: my 'tr.sortable-row' is in individual "tr" of the table
<tbody>
<tr class="sortable-row">my td are here</tr>
</tbody>

2:That is jquery sotrable options please visit

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900