jQuery UI Widgets › Forums › Editors › Button, RepeatButton, ToggleButton, LinkButton › SwitchButtons disappear from Grid
Tagged: switch button
This topic contains 3 replies, has 2 voices, and was last updated by Peter Stoev 12 years, 4 months ago.
-
Author
-
Hello!
I tried to put SwitchButtons into a Grid, but when I moved Grid’s scrollbar SwitchButtons were disappeard.
How could be fixed this problem?Here is my sample code:
<!DOCTYPE html><html lang="en"><head> <title id='Description'>This example shows how to show a checkbox column in the Grid plugin. </title> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="../../scripts/jquery-1.7.2.min.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxdata.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxmenu.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcheckbox.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxlistbox.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxdropdownlist.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxgrid.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxgrid.selection.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxswitchbutton.js"></script> <script type="text/javascript" src="../../scripts/gettheme.js"></script> <script type="text/javascript" src="generatedata.js"></script> <script type="text/javascript"> $(document).ready(function () { var linkrenderer = function (row, column, value) { if (value.indexOf('#') != -1) { value = value.substring(0, value.indexOf('#')); } var format = { target: '"_blank"' }; var html = $.jqx.dataFormat.formatlink(value, format); html='<div class="buttonSwitch"></div>'; return html; } var theme = ''; // prepare the data var data = generatedata(); var source = { localdata: data, datatype: "array" }; // initialize jqxGrid $("#jqxgrid").jqxGrid( { width: 670, source: source, theme: theme, columns: [ { text: 'Link', datafield: 'link', width: 100, cellsrenderer: linkrenderer }, { text: 'First Name', datafield: 'firstname', width: 100 }, { text: 'Last Name', datafield: 'lastname', width: 100 }, { text: 'Product', datafield: 'productname', width: 180 }, { text: 'Available', datafield: 'available', columntype: 'checkbox', width: 70 }, { text: 'Quantity', datafield: 'quantity', width: 80, cellsalign: 'right' }, { text: 'Unit Price', datafield: 'price', width: 90, cellsalign: 'right', cellsformat: 'c2' }, { text: 'Total', datafield: 'total', width: 100, cellsalign: 'right', cellsformat: 'c2' } ] }); $('#button4').jqxSwitchButton({ height: 27, width: 81, theme: theme, checked: true }); $('#jqxGrid').bind('initialized', function () { console.log('initialized')}); $('#jqxGrid').bind('bindingcomplete', function () { console.log('bindingcomplete')}); $('.buttonSwitch').jqxSwitchButton({ height: 27, width: 81, theme: theme, checked: true }); }); </script></head><body class='default'> <div id='jqxWidget' style="font-size: 13px; font-family: Verdana; float: left;"> <div id="button4"> </div> <div id="jqxgrid"> </div> </div></body></html>
Hi VageR2,
Unfortunately, jqxGrid does not support Switch Buttons. We’ll consider adding support for jqxSwitchButton widget in the jqxGrid’s future versions.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter Stoev!
Thank you your fast answer!
Is it possible to support jqxGrid this feature in the upcomming releases?BRG,
VageR2Hi VageR2,
The feature’s implementation is not planned and I am unable to provide you a time-frame when you should expect it. As soon as we make a decision, we’ll publish it on our Roadmap here: http://www.jqwidgets.com/roadmap/.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.