jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Pinned vs Hidden Column
Tagged: jqxgrid
This topic contains 2 replies, has 2 voices, and was last updated by nikitaso 11 years, 12 months ago.
-
AuthorPinned vs Hidden Column Posts
-
if column set ispinned:true and ishidden:true column still visible, you have “unpin” it and then it disappears. is this normal behavior?
Thank you.
Hi nikitaso,
First of all if you want to have a pinned column you can use the ‘pinned’ property set to true. Secondly to hide a column you can use the ‘hidden’ property set to true as well. Please take a look at the following example:
<!DOCTYPE html><html lang="en"><head> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="../../scripts/jquery-1.9.0.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/jqxlistbox.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxdropdownlist.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxmenu.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxgrid.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxgrid.sort.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxgrid.pager.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxgrid.selection.js"></script> <script type="text/javascript" src="../../scripts/gettheme.js"></script> <script type="text/javascript"> $(document).ready(function () { var theme = getDemoTheme(); var url = "../sampledata/products.xml"; // prepare the data var source = { datatype: "xml", datafields: [ { name: 'ProductName' }, { name: 'QuantityPerUnit' }, { name: 'UnitPrice', type: 'float' }, { name: 'UnitsInStock', type: 'float' }, { name: 'UnitsOnOrder', type: 'float' }, { name: 'ReorderLevel', type: 'float' }, { name: 'CategoryID', type: 'int' } ], root: "Products", record: "Product", id: 'ProductID', url: url }; var categories = {}; var categoriesurl = '../sampledata/categories.xml'; $.ajax({ async: false, url: categoriesurl, success: function (data, status, xhr) { categories = $("Category", data); } }); $("#jqxgrid").jqxGrid( { width: 670, source: source, theme: theme, sortable: true, pageable: true, autoheight: true, columns: [ { text: 'Product Name', datafield: 'ProductName', width: 250, pinned: true, hidden: true }, { text: 'Category', datafield: 'CategoryID', width: 80, cellsalign: 'right' }, { text: 'Quantity Per Unit', datafield: 'QuantityPerUnit', width: 200, cellsalign: 'right' }, { text: 'Unit Price', datafield: 'UnitPrice', width: 100, cellsformat: 'c2', cellsalign: 'right' }, { text: 'Units On Order', datafield: 'UnitsOnOrder', width: 110, cellsalign: 'right' }, { text: 'Reorder Level', datafield: 'ReorderLevel', width: 100, cellsalign: 'right' } ] }); }); </script></head><body class='default'> <div id='jqxWidget' style="font-size: 13px; font-family: Verdana; float: left;"> <div id="jqxgrid"> </div> </div></body></html>
Best Wishes,
MariyajQWidgets Team
http://www.jqwidgets.comWhat I mean is when column property “pinned” set true and “hidden” set true – column is still visible.
Not a big deal, but confusing.
-
AuthorPosts
You must be logged in to reply to this topic.