javascript - retrieve value from a slick grid table -
this how slick grid table looks like. , rows added on function. how can write function in js slick-cell l0 r0
value each class. want temp,temp2, sss , test33
values
i new slick grid thing appreciated.
<div class="grid-canvas" style="height: 206px; width: 390px;"> <div class="ui-widget-content slick-row even" style="top:0px"> <div class="slick-cell l0 r0">temp</div> <div class="slick-cell l1 r1">test group</div> <div class="slick-cell l2 r2 edit-column"></div> <div class="slick-cell l3 r3 delete-column"></div> </div> <div class="ui-widget-content slick-row odd" style="top:25px"> <div class="slick-cell l0 r0">temp2</div> <div class="slick-cell l1 r1">test g 2 </div> <div class="slick-cell l2 r2 edit-column"></div> <div class="slick-cell l3 r3 delete-column"></div> </div> <div class="ui-widget-content slick-row even" style="top:100px"> <div class="slick-cell l0 r0">sss</div> <div class="slick-cell l1 r1">sss</div> <div class="slick-cell l2 r2 edit-column"></div> <div class="slick-cell l3 r3 delete-column"></div> </div> <div class="ui-widget-content slick-row odd" style="top:125px"> <div class="slick-cell l0 r0">test33</div> <div class="slick-cell l1 r1">test33</div> <div class="slick-cell l2 r2 edit-column"></div> <div class="slick-cell l3 r3 delete-column"></div> </div> </div>
i have never used slickgrid, , don't know if have built-in function helps you, if can use plain-old jquery, can try this:
var output = $(".slick-row").find(".l0.r0").map(function () { return $(this).text(); }).get(); console.log(output); // output // array[4] // 0: "temp" // 1: "temp2" // 2: "sss" // 3: "test33"
check jsfiddle , open console see result:
Comments
Post a Comment