Forum
09:14
22/08/2012
I am pasting my code below. Kindly help me out in freezing the column
</html></body> </form> </table> <table id="sample"> <form id="form1" runat="server"><body></head>
</script> $("#sample").trigger('reloadGrid', [{ current: true}]); $("#sample").jqGrid('setFrozenColumns');// .trigger("reloadGrid",[{current:true}]);// .jqGrid("setFrozenColumns") // .jqGrid("setColProp","id",{frozen:true}) // $("#sample").jqGrid("destroyFrozenColumns") }); } jQuery("#sample").jqGrid('addRowData', mydata2[i].id, mydata2[i]);
for (var i = 0; i < mydata2.length; i++) {
]; { id: "98765", name: "Matrix Printer", note: "note3", stock: "No", dep: "km", Service: "abc", Delivery: "ccv", Result: "bbc", Feedback: "yes", Total: "100", Data: "rre", Views: "dgx", Rows: "5", Columns: "8", Table: "13" } { id: "87654", name: "Server", note: "note2", stock: "Yes", dep: "bc", Service: "abc", Delivery: "ccv", Result: "bbc", Feedback: "yes", Total: "100", Data: "rre", Views: "dgx", Rows: "5", Columns: "8", Table: "13" }, { id: "76543", name: "Mobile Telephone", note: "note", stock: "Yes", dep: "we", Service: "abc", Delivery: "ccv", Result: "bbc", Feedback: "yes", Total: "100", Data: "rre", Views: "dgx", Rows: "5", Columns: "8", Table: "13" }, { id: "67890", name: "Play Station", note: "note3", stock: "No", dep: "gg", Service: "abc", Delivery: "ccv", Result: "bbc", Feedback: "yes", Total: "100", Data: "rre", Views: "dgx", Rows: "5", Columns: "8", Table: "13" }, { id: "56789", name: "Laser Printer", note: "note2", stock: "Yes", dep: "km", Service: "abc", Delivery: "ccv", Result: "bbc", Feedback: "yes", Total: "100", Data: "rre", Views: "dgx", Rows: "5", Columns: "8", Table: "13" }, { id: "45678", name: "Speakers", note: "note", stock: "No", dep: "gg", Service: "abc", Delivery: "ccv", Result: "bbc", Feedback: "yes", Total: "100", Data: "rre", Views: "dgx", Rows: "5", Columns: "8", Table: "13" }, { id: "34567", name: "LCD Monitor", note: "note3", stock: "Yes", dep: "we", Service: "abc", Delivery: "ccv", Result: "bbc", Feedback: "yes", Total: "100", Data: "rre", Views: "dgx", Rows: "5", Columns: "8", Table: "13" }, { id: "23456", name: "Laptop", note: "Long text ", stock: "Yes", dep: "bc", Service: "abc", Delivery: "ccv", Result: "bbc", Feedback: "yes", Total: "100", Data: "rre", Views: "dgx", Rows: "5", Columns: "8", Table: "13" }, { id: "12345", name: "Desktop Computer", note: "note", stock: "Yes", dep: "km", Service: "abc", Delivery: "ccv", Result: "bbc", Feedback: "yes", Total: "100", Data: "rre", Views: "dgx", Rows: "5", Columns: "8", Table: "13" }, var mydata2 = [ }); caption: "sample table"
], { name: 'Table', index: 'Table', width: 90, sorttype: "int", editable: true } { name: 'Columns', index: 'Columns', width: 90, sorttype: "int", editable: true }, { name: 'Rows', index: 'Rows', width: 90, sorttype: "int", editable: true}, { name: 'Views', index: 'Views', width: 90, sorttype: "int", editable: true }, { name: 'Data', index: 'Data', width: 90, sorttype: "int", editable: true }, { name: 'Total', index: 'Total', width: 90, sorttype: "int", editable: true }, { name: 'Feedback', index: 'Feedback', width: 90, sorttype: "int", editable: true }, { name: 'Result', index: 'Result', width: 90, sorttype: "int", editable: true }, { name: 'Delivery', index: 'Delivery', width: 90, sorttype: "int", editable: true }, { name: 'Service', index: 'Service', width: 90, sorttype: "int", editable: true }, { name: 'note', index: 'note', width: 200, sortable: false, editable: true, edittype: "textarea", editoptions: { rows: "2", cols: "10"} }, { name: 'dep', index: 'dep', width: 90, editable: true,frozen: true, edittype: "select", editoptions: { value: "a:km;b:bc;c:we;i:gg"} }, { name: 'stock', index: 'stock', width: 60, editable: true,frozen: true, edittype: "select", editoptions: { value: "aw:Yes;bk:No"} }, { name: 'name', index: 'name', width: 150, editable: true,frozen: true, editoptions: { size: "20", maxlength: "30"} }, { name: 'id', index: 'id', width: 90, sorttype: "int", editable: true, frozen: true }, colModel: [ colNames: ['ID Number', 'Name', 'Stock', 'department', 'Notes', 'Service', 'Delivery', 'Result', 'Feedback', 'Total', 'Data', 'Views', 'Rows', 'Columns', 'Table'], shrinkToFit: false, scroll: false, height: 250, datatype: "local", $("#sample").jqGrid({ var lastsel2;
$(document).ready(function() { <script type="text/javascript"> <script src="Scripts/Lib/grid.custom.js" type="text/javascript"></script> <script src="Scripts/Lib/jquery.jqGrid.src.js" type="text/javascript"></script>
<script src="Scripts/Lib/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="Scripts/Lib/jquery-1.7.2.min.js" type="text/javascript"></script>
<link href="Styles/ui.jqgrid.css" rel="stylesheet" type="text/css" /> <link href="Styles/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Page</title><head id="Head1" runat="server"><html xmlns="http://www.w3.org/1999/xhtml"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Freeze.aspx.cs" Inherits="Freeze" %>
Most Users Ever Online: 715
Currently Online:
73 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66