Deprecated: iconv_set_encoding(): Use of iconv.internal_encoding is deprecated in /home/datamerx/public_html2/codemerx/jqgrid/libraries/joomla/string/string.php on line 28

Deprecated: iconv_set_encoding(): Use of iconv.input_encoding is deprecated in /home/datamerx/public_html2/codemerx/jqgrid/libraries/joomla/string/string.php on line 29

Deprecated: iconv_set_encoding(): Use of iconv.output_encoding is deprecated in /home/datamerx/public_html2/codemerx/jqgrid/libraries/joomla/string/string.php on line 30

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/datamerx/public_html2/codemerx/jqgrid/libraries/joomla/filter/input.php on line 652

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/datamerx/public_html2/codemerx/jqgrid/libraries/joomla/filter/input.php on line 652
jqGrid & fancyBox Integration

Most Popular  


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/datamerx/public_html2/codemerx/jqgrid/libraries/joomla/filter/input.php on line 652
   

Deprecated: Non-static method PhocaGalleryPath::getPath() should not be called statically, assuming $this from incompatible context in /home/datamerx/public_html2/codemerx/jqgrid/plugins/content/phocagallery/phocagallery.php on line 57

Deprecated: Non-static method PhocaGalleryPath::getInstance() should not be called statically, assuming $this from incompatible context in /home/datamerx/public_html2/codemerx/jqgrid/administrator/components/com_phocagallery/libraries/phocagallery/path/path.php on line 36

Deprecated: Non-static method PhocaGalleryLibrary::getLibrary() should not be called statically, assuming $this from incompatible context in /home/datamerx/public_html2/codemerx/jqgrid/plugins/content/phocagallery/phocagallery.php on line 64

Deprecated: Non-static method PhocaGalleryLibrary::getInstance() should not be called statically, assuming $this from incompatible context in /home/datamerx/public_html2/codemerx/jqgrid/administrator/components/com_phocagallery/libraries/phocagallery/library/library.php on line 44

Deprecated: Non-static method PhocaGalleryPath::getPath() should not be called statically, assuming $this from incompatible context in /home/datamerx/public_html2/codemerx/jqgrid/plugins/content/phocagalleryslideshow/phocagalleryslideshow.php on line 40

Deprecated: Non-static method PhocaGalleryPath::getInstance() should not be called statically, assuming $this from incompatible context in /home/datamerx/public_html2/codemerx/jqgrid/administrator/components/com_phocagallery/libraries/phocagallery/path/path.php on line 36

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/datamerx/public_html2/codemerx/jqgrid/libraries/joomla/filter/input.php on line 652

jqGrid and fancyBox Integration

  Using fancyBox inside jqGrid is a pretty common scenario. Clicking on the contents of the Shipment column in the grid above will display a fancyBox showing the name of the shipping company.

So, this demo describes all the steps necessary to integrate these two popular jQuery plugins.

 

1. fancyBox links in jqGrid

We have chosen to use a custom formatter to generate the <a> tags fancyBoxs hooks up to. The formatter is placed on the shipment column in the colModel.

{name: 'shipment', index: 'shipment', width: 80, align: 'center', formatter:fancyBoxFormatter} 

And here is how the formatter looks like:

function fancyBoxFormatter ( cellvalue, options, rowObject )
{
	var result, 
		link,
		fancyBoxHTML,
		fancyBoxContent;
		
		link = "<a class=\"fancybox\" href=\"#data" + options.rowId + "\">" + cellvalue + "</a>";
					
		switch (cellvalue)
		{
			case "FE":
				fancyBoxContent = "FedEx";
				break;
			case "TN":
				fancyBoxContent = "TNT";
				break;						
			case "IN":
				fancyBoxContent = "Intime";
				break;	
			case "us":
				fancyBoxContent = "USPS";
				break;							
		}
		
		fancyBoxHTML = "<div style=\"display:none\"><div id=\"data" + options.rowId + "\">" + fancyBoxContent + "</div></div>";
		
	return link + fancyBoxHTML;	
}

The formatter above would generate markup along the lines of:

<a class="fancybox" href="#data1">FE</a>

<div style="display:none">
  <div id="data1">FedEx</div>
</div>

 So, attaching fancyBox to the <a> tag above will result in fancyBox contents being set to "FedEx".

2. Attaching fancyBox to the links generated in jqGrid

That's a really simple thing to do:

gridComplete: function () 
{
	$(".fancybox").fancybox();
}

 That is all it takes. The complete code of the demo follows.

$(document).ready(function () {
	'use strict';
	 var gidData = [
			{id: "1", orderdate: "2013-10-01", customer: "customer",  price: "200.00", vat: "10.00", completed: true, shipment: "TN", total: "210.00"},
			{id: "2", orderdate: "2013-10-02", customer: "customer2",  price: "300.00", vat: "20.00", completed: false, shipment: "FE", total: "320.00"},
			{id: "3", orderdate: "2011-07-30", customer: "customer3",  price: "400.00", vat: "30.00", completed: false, shipment: "FE", total: "430.00"},
			{id: "4", orderdate: "2013-10-04", customer: "customer4",  price: "200.00", vat: "10.00", completed: true, shipment: "TN", total: "210.00"},
			{id: "5", orderdate: "2013-11-31", customer: "customer5",  price: "300.00", vat: "20.00", completed: false, shipment: "FE", total: "320.00"},
			{id: "6", orderdate: "2013-09-06", customer: "customer6",  price: "400.00", vat: "30.00", completed: false, shipment: "FE", total: "430.00"},
			{id: "7", orderdate: "2011-08-30", customer: "customer7",  price: "200.00", vat: "10.00", completed: true, shipment: "TN", total: "210.00"},
			{id: "8", orderdate: "2013-10-03", customer: "customer8",  price: "300.00", vat: "20.00", completed: false, shipment: "FE", total: "320.00"},
			{id: "9", orderdate: "2013-09-01", customer: "customer9",  price: "400.00", vat: "30.00", completed: false, shipment: "TN", total: "430.00"},
			{id: "10", orderdate: "2013-09-08", customer: "customer10", price: "500.00", vat: "30.00", completed: true, shipment: "IN", total: "530.00"},
			{id: "11", orderdate: "2013-09-08", customer: "customer11",  price: "500.00", vat: "30.00", completed: false, shipment: "FE", total: "530.00"},
			{id: "12", orderdate: "2013-09-10", customer: "customer12",  price: "500.00", vat: "30.00", completed: false, shipment: "FE", total: "530.00"}
		],
		theGrid = $("#theGrid"),
		numberTemplate = {formatter: 'number', align: 'right', sorttype: 'number'};

	theGrid.jqGrid({
		datatype: 'local',
		data: gidData,
		colNames: ['Customer', 'Date',  'Price', 'VAT', 'Total', 'Completed', 'Shipment'],
		colModel: [
			{name: 'customer', index: 'customer', width: 90},
			{name: 'orderdate', index: 'orderdate', width: 100, align: 'center', sorttype: 'date',
				formatter: 'date', formatoptions: {newformat: 'd-M-Y'}, datefmt: 'd-M-Y'},
			{name: 'price', index: 'price', width: 55, template: numberTemplate},
			{name: 'vat', index: 'vat', width: 42, template: numberTemplate},
			{name: 'total', index: 'total', width: 50, template: numberTemplate},
			{name: 'completed', index: 'completed', width: 30, align: 'center', formatter: 'checkbox'},
			{name: 'shipment', index: 'shipment', width: 80, align: 'center', formatter:fancyBoxFormatter}                  
		],
		gridview: true,             
		rownumbers: false,
		rowNum: 10,
		rowList: [5, 10, 15],
		pager: '#gridPager',
		sortname: 'orderdate',
		viewrecords: true,
		sortorder: 'desc',
		caption: 'jqGrid and fancyBox integration',
		height: '100%',
		gridComplete: function () 
		{
			$(".fancybox").fancybox();
		}
	});
});

function fancyBoxFormatter ( cellvalue, options, rowObject )
{
	var result, 
		link,
		fancyBoxHTML,
		fancyBoxContent;
		
		link = "<a class=\"fancybox\" href=\"#data" + options.rowId + "\">" + cellvalue + "</a>";
					
		switch (cellvalue)
		{
			case "FE":
				fancyBoxContent = "FedEx";
				break;
			case "TN":
				fancyBoxContent = "TNT";
				break;						
			case "IN":
				fancyBoxContent = "Intime";
				break;	
			case "us":
				fancyBoxContent = "USPS";
				break;							
		}
		
		fancyBoxHTML = "<div style=\"display:none\"><div id=\"data" + options.rowId + "\">" + fancyBoxContent + "</div></div>";
		
	return link + fancyBoxHTML;	
}

 

 


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/datamerx/public_html2/codemerx/jqgrid/libraries/joomla/filter/input.php on line 652
Posted: 2 years 10 months ago by raju #608

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/datamerx/public_html2/codemerx/jqgrid/libraries/joomla/filter/input.php on line 652
raju's Avatar
need this article
Posted: 1 month 1 week ago by dongbei #9874

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/datamerx/public_html2/codemerx/jqgrid/libraries/joomla/filter/input.php on line 652
dongbei's Avatar
North Face Jackets ,
Polo Ralph Lauren Outlet ,
kate spade outlet ,
Ray Ban Sunglasses ,
Kate Spade Handbags Outlet ,
Tory Burch Outlet Store ,
Coach Outlet Online ,
Ray Ban Sunglasses Outlet ,
Coach Factory Outlet ,
Oakley Sunglasses Outlet ,
Coach Outlet ,
Moncler Jackets Outlet ,
Fitflop Sandals ,
Prada Handbags ,
Coach Outlet ,
Michael Kors Bags Outlet ,
Tory Burch Outlet Store ,
Ray Ban Outlet ,
oakley sunglasses outlet ,
North Face Jackets Outlet ,
Burberry Outlet ,
Michael Kors Outlet ,
Polo Outlet ,
Longchamp Outlet ,
Swarovski Jewelry Outlet ,
Oakley Sunglasses ,
Timberland ,
longchamp handbags ,
Ray Ban Sunglasses ,
Cheap Jordans ,
Timberland Outlet ,
Kate Spade Handbags ,
Oakley Sunglasses ,
Air Jordans ,
Pandora Bracelets ,
Ray Ban Sunglasses ,
Salomon Outlet ,
Nike Outlet Store ,
Converse Shoes ,
Adidas Outlet ,
Tommy Hilfiger Shirts ,
New Balance Shoes Outlet ,
Asics Shoes ,
Giuseppe Zanotti Outlet ,
Polo Ralph Lauren Outlet ,
Polo Ralph Lauren Shirts ,
Coach Outlet ,
Coach Outlet ,
Cheap Oakley Outlet ,
Louboutin Outlet ,
Ralph Lauren Outlet ,
Cheap Ray Ban Sunglasses ,
Coach Outlet Store Online ,
Coach Factory Outlet Online ,
Coach Outlet Online ,
Coach Outlet ,
Michael Kor Factory Outlet ,
Michael Kors Outlet Online ,
Michael Kors Outlet ,
Michael Kors Factory Outlet Online ,
michael kors outlet ,
Coach Outlet Clearance ,
Michael Kors Online ,
Coach Outlet online ,
Michael Kors Outlet Online ,
nike shoes ,
nike outlet ,
cheap Jordan ,
retro jordan shoes ,
tory burch outlet ,
tory burch sale ,
oakley outlet online ,
cheap oakley sunglasses ,
ray ban outlet online ,
ray ban sunglasses outlet ,
coach outlet ,
the north face outlet ,
Michael Kors Bags ,
true religion jeans ,
Ed Hardy Clothing Outlet ,
Under Armour Outlet Store ,
Air Jordans Shoes ,
Christian Louboutin Outlet ,
Nike Factory Outlet ,
coach outlet ,
Coach Factory Outlet ,
north face jackets ,
Coach Outlet ,
kate spade handbags ,
coach factory outlet ,
Coach Outlet Store Online ,
Michael Kors Outlet Online ,
Cheap Ray Ban ,
Coach Outlet Store Online ,
nba jerseys ,
ray ban sunglasses ,
cheap jerseys from china ,
oakley sunglasses store ,
Michael Kors outlet ,
Ray Ban Eyeglasses ,
michael kors outlet canada ,
oakley sunglasses ,
Coach Factory Outlet ,
Michael Kors Outlet Online ,
sac longchamp pas cher ,
mont blanc michigan ,
louboutin ,
Fitflop Shoes ,
coach factory outlet online ,
sac longchamp paris ,
coach outlet online ,
polo outlet ,
Polo Ralph Lauren Outlet Store ,
yeezy boost 350 ,
Red Bottom Shoes ,
adidas nmd ,
Christian Louboutin Outlet ,
true religion outlet ,
true religion jeans outlet ,
Pandora Jewelry ,
Ferragamo Shoes ,
yeezy boost 350 ,
adidas nmd R1 ,
true religion jeans ,
air jordan shoes ,
[url=http://www.jordan--shoes.us.com/]jordan shoes for sale[/url] ,
oakley vault ,
vans outlet ,
Coach Outlet Online ,
nike store ,
uggs ,
Uggs Outlet ,
pandora charms ,
Nike Air Max 2017 ,
Coach factory outlet ,
Kate Spade Handbags ,
mont blanc ,
Prada ,
swarovski outlet ,
UGG Australia ,
Salomon Shoes ,
Moncler ,
montblanc pen sale ,
moncler ,
burberry ,
Vans Store ,
under armour outlet ,
the north face ,
longchamp sale ,
fitflop sale ,
swarovski crystal ,
polo ralph lauren ,
timberland shoes ,
ugg store ,
polo ralph lauren ,
timberland boots ,
Nike Shoes ,
nba jerseys sale ,
nhl jerseys ,
under armour outlet ,
Coach Outlet ,
nfl jerseys wholesale ,
Christian Louboutin Sneakers ,
Adidas NMD ,
red bottom shoes ,
cheap jerseys china ,
coach purses ,
ugg outlet ,
nike air max 2017 ,
red bottoms louboutin ,
Adidas Outlet Store ,
Christian Louboutin ,
ugg boots on sale ,
michael kors outlet online ,..
Posted: 1 week 2 days ago
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/datamerx/public_html2/codemerx/jqgrid/libraries/joomla/filter/input.php on line 652
by jeje222
#10098

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/datamerx/public_html2/codemerx/jqgrid/libraries/joomla/filter/input.php on line 652
jeje222's Avatar
nmd
adidas nmd
golden goose
michael kors outlet
air force 1
reebok outlet
jordan shoes
michael kors handbags
kevin durant shoes
nike roshe run
adidas gazelle
adidas stan smith
longchamp longchamps
longchamp bags
jordan 6
longchamp
adidas outlet
jordan shoes
kobe 11
kobe shoes
hogan outlet online
curry shoes
michael kors handbags
adidas tubular shadow
longchamp handbags
yeezy shoes
kobe 11
michael jordan shoes
adidas nmd
led shoes
nike roshe uk
ysl handbags
lacoste outlet
jordan retro 12
led shoes for kids
adidas superstar
stephen curry shoes
air jordans
light up shoes
air max 2016
michael kors handbags
longchamp bags
golden goose
adidas tubular
jordan 11 retro
nike air zoom
yeezy boost 350
michael kors outlet online
ferragamo belt
ysl bags
nike dunk shoes
air max 90
fitflops
yeezys
jordan shoes
cheap jordans
[url=http://www.cheap--jordans.us.com]cheap jordans[/url]
adidas nmd
michael kors outlet
lebron 14
kyrie 3 shoes
pandora bracelet
michael kors outlet
calvin klein outlet online
yeezys
longchamp
lebron 13 shoes
air force 1
golden goose
links of london
roshe run
kobe sneakers
nike air zoom
tory burch shoes
kobe 9
adidas nmd
adidas outlet
jordan 12
gucci belts
patriots jersey
adidas superstar
adidas superstar shoes
yeezy boost 350 v2
adidas tubular
retro jordans
longchamp
hermes birkin
nike air max
basketball shoes
curry 3 shoes
true religion jeans
yeezy boost 350
nike air force 1
vans shoes
pandora charms
vibram five fingers
kobe byrant shoes
golden goose sneakers
nike mercurial
pandora jewelry
adidas ultra
hermes handbags
michael kors outlet
jordan shoes
adidas tubular
atlanta falcons jersey
kobe 9
yeezy boost
real jordans for sale cheap
air jordan
adidas outlet online
yeezy boost 350 v2
falcons jersey
michael kors factory outlet
nike air force 1
balenciaga shoes
goyard handbags
yeezy boost 350
nike air max 2018
pandora charms
jordan 13
nike air force
nike huarache
adidas eqt
air max 2017
adidas stan smith shoes
jordan shoes
louboutin shoes uk
nike zoom
roshe shoes
chrome hearts
michael kors outlet online
nike football boots
adidas yeezy
adidas ultra boost
nike polo shirts
led shoes
kd shoes
cheap jordans
http://www.kobeshoes.uk
kate spade handbags
birkin bag
authentic jordans
converse outlet
kate spade outlet
yeezy boost
fitflops sale clearance
kyrie 3
lebron james shoes
dior sunglasses
adidas stan smith
brady jersey
tory burch outlet
nike huarache
adidas yeezy boost
yeezy boost
nike polo
true religion
prada glasses
kobe shoes
hermes belts
100% real jordans for cheap
curry 4
balenciaga sneakers
nike roshe one
adidas ultra boost uncaged
golden goose sneakers
longchamp outlet
golden goose outlet
nmd
cheap nfl jerseys
links of london sale
harden shoes
tom ford sunglasses
basketball shoes
hermes belts for men
jordan retro
nike dunks
new england patriots jersey
nike huarache
curry 4
cheap jordans
kobe basketball shoes
yeezy boost 350 v2
vibram fivefingers
yeezy boost
jordan retro 6
adidas tubular
lacoste polo
http://www.kobebasketballshoes.us.com
goyard bags
nike basketball shoes
yeezy boost 350
nike air huarache
hogan outlet
michael kors outlet
van cleef arpels
moncler jackets
nmd
nhl jerseys
converse outlet
converse shoes
cheap jordans
adidas tubular shadow
asics running shoes
prada sunglasses
van cleef
lebron shoes
longchamp handbags
retro jordans
air yeezy
adidas stan smith sneakers
hermes belt
gucci belt
links of london outlet store
adidas online shop
nike roshe run
michael jordan shoes
longchamp sale
adidas nmd
louboutin shoes
yeezy
adidas store
adidas ultra boost
lacoste outlet
fitflops
yeezy boost 350
longchamp bags
adidas online shop
af1
nike zoom running shoe
chrome hearts
air max 90
asics shoes
lebron 14 shoes
cheap jordans
hermes belt
michael kors outlet store
adidas neo
chrome hearts
kate spade handbags
nfl jerseys
nike foamposite
kyrie 4
adidas shoes
retro jordans
air max
curry 3
kyrie irving shoes
timberland boots
yeezy boost 350 v2
nike air huarache
birkin bag
longchamp bags
chrome hearts online
yeezy shoes
michael kors factory outlet
true religion outlet
timberland outlet
michael kors handbags
cheap basketball shoes
pandora jewelry
air jordan shoes
calvin klein outlet
adidas outlet
nike zoom
kobe basketball shoes
mlb jerseys
nike air force
nike air max 90
moncler outlet
michael kors uk
nike air max
yeezy boost 350
adidas nmd runner
air jordan shoes
[url=http://www.michael--korsoutlet.us.org]michael kors[/url]
vans outlet
[url=http://www.michael--korsoutlet.us.org]michael kors outlet[/url]
converse outlet store
nike air max 90
cartier bracelet
adidas nmd r1
lacoste online shop
adidas ultra boost
dior glasses
adidas outlet online
tory burch shoes
air jordan 13
yeezy boost
ultra boost
nike air max 2017
kobe shoes
air max 2018
cheap mlb jerseys
jordan 4
Kanye West shoes
yeezy boost 350
birkin bag
hermes belt
tom ford eyewear
vans shoes
michael kors outlet online
jordan 11
true religion
air jordan
yeezy shoes
lebron 13
kyrie shoes
kyrie 4
ferragamo belts
longchamps
100% real jordans for cheap
yeezy shoes
james harden shoes
chrome hearts online
links of london
reebok shoes
adidas superstar shoes
longchamp outlet

   

Social Login  


 
   

Your Cart  


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/datamerx/public_html2/codemerx/jqgrid/libraries/joomla/filter/input.php on line 652
The cart is empty
   

Latest Forum Posts  


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/datamerx/public_html2/codemerx/jqgrid/libraries/joomla/filter/input.php on line 652