JavaScript DHTML/SmartClient/ListGrid Row
Содержание
Add control to rollovered row
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are
licensed under the terms of the GNU Lesser General Public License, version 3.
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL,
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge,
but may not be used as part of screen designs separate from SmartClient components without a purchase
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008.
-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->
<HTML><HEAD>
<SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Calendar.js></SCRIPT>
<SCRIPT SRC=isomorphic/skins/standard/load_skin.js></SCRIPT>
</HEAD>
<BODY BGCOLOR="silver">
<SCRIPT>
countryData = [
{
continent:"North America",
countryName:"United States",
countryCode:"US",
area:9631420,
population:298444215,
gdp:12360.0,
independence:new Date(1776,6,4),
government:"federal republic",
government_desc:2,
capital:"Washington, DC",
member_g8:true,
article:"http://en.wikipedia.org/wiki/United_states"
},
{
continent:"Asia",
countryName:"China",
countryCode:"CH",
area:9596960,
population:1313973713,
gdp:8859.0,
government:"Communist state",
government_desc:0,
capital:"Beijing",
member_g8:false,
article:"http://en.wikipedia.org/wiki/China"
},
{
continent:"Asia",
countryName:"Japan",
countryCode:"JA",
area:377835,
population:127463611,
gdp:4018.0,
government:"constitutional monarchy with parliamentary government",
government_desc:1,
capital:"Tokyo",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Japan"
},
{
continent:"Asia",
countryName:"India",
countryCode:"IN",
area:3287590,
population:1095351995,
gdp:3611.0,
independence:new Date(1947,7,15),
government:"federal republic",
government_desc:2,
capital:"New Delhi",
member_g8:false,
article:"http://en.wikipedia.org/wiki/India"
},
{
continent:"Europe",
countryName:"Germany",
countryCode:"GM",
area:357021,
population:82422299,
gdp:2504.0,
independence:new Date(1871,0,18),
government:"federal republic",
government_desc:2,
capital:"Berlin",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Germany"
},
{
continent:"Europe",
countryName:"United Kingdom",
countryCode:"UK",
area:244820,
population:60609153,
gdp:1830.0,
independence:new Date(1801,0,1),
government:"constitutional monarchy",
government_desc:1,
capital:"London",
member_g8:true,
article:"http://en.wikipedia.org/wiki/United_kingdom"
},
{
continent:"Europe",
countryName:"France",
countryCode:"FR",
area:547030,
population:60876136,
gdp:1816.0,
government:"republic",
government_desc:5,
capital:"Paris",
member_g8:true,
article:"http://en.wikipedia.org/wiki/France"
},
{
continent:"Europe",
countryName:"Italy",
countryCode:"IT",
area:301230,
population:58133509,
gdp:1698.0,
independence:new Date(1861,2,17),
government:"republic",
government_desc:5,
capital:"Rome",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Italy"
},
{
continent:"Asia",
countryName:"Russia",
countryCode:"RS",
area:17075200,
population:142893540,
gdp:1589.0,
independence:new Date(1991,7,24),
government:"federation",
government_desc:3,
capital:"Moscow",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Russia"
},
{
continent:"South America",
countryName:"Brazil",
countryCode:"BR",
area:8511965,
population:188078227,
gdp:1556.0,
independence:new Date(1822,8,7),
government:"federative republic",
government_desc:3,
capital:"Brasilia",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Brazil"
},
{
continent:"North America",
countryName:"Canada",
countryCode:"CA",
area:9984670,
population:33098932,
gdp:1114.0,
independence:new Date(1867,6,1),
government:"constitutional monarchy with parliamentary democracy and federation",
government_desc:1,
capital:"Ottawa",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Canada"
},
{
continent:"North America",
countryName:"Mexico",
countryCode:"MX",
area:1972550,
population:107449525,
gdp:1067.0,
independence:new Date(1810,8,16),
government:"federal republic",
government_desc:2,
capital:"Mexico (Distrito Federal)",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Mexico"
},
{
continent:"Europe",
countryName:"Spain",
countryCode:"SP",
area:504782,
population:40397842,
gdp:1029.0,
independence:new Date(1492,0,1),
government:"parliamentary monarchy",
government_desc:4,
capital:"Madrid",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Spain"
},
{
continent:"Asia",
countryName:"South Korea",
countryCode:"KS",
area:98480,
population:48846823,
gdp:965.3,
independence:new Date(1945,7,15),
government:"republic",
government_desc:5,
capital:"Seoul",
member_g8:false,
article:"http://en.wikipedia.org/wiki/South_korea"
},
{
continent:"Asia",
countryName:"Indonesia",
countryCode:"ID",
area:1919440,
population:245452739,
gdp:865.6,
independence:new Date(1945,7,17),
government:"republic",
government_desc:5,
capital:"Jakarta",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Indonesia"
}
]
isc.DataSource.create({
ID: "countryDS",
fields:[
{name:"countryCode", title:"Code"},
{name:"countryName", title:"Country"},
{name:"capital", title:"Capital"}
],
clientOnly: true,
testData: countryData
})
isc.ListGrid.create({
ID:"countryList",
width:500, height:224,
data: countryData,
selectionType:"single",
fields:[
{name:"countryCode", title:"Flag", width:50, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png"},
{name:"countryName", title:"Country"},
{name:"capital", title:"Capital"},
{name:"continent", title:"Continent"}
],
showRollOverCanvas:true,
rollOverCanvasConstructor:isc.HLayout,
rollOverCanvasProperties:{
snapTo:"TR", height:20, width:40,
members:[
{_constructor:"Button", title:"+",
click:"isc.say("Expanded record:" + this.echo(this.parentElement.record))",
height:20, width:20},
{_constructor:"Button", title:"-",
click:"isc.say("Collapsed record:" + this.echo(this.parentElement.record))",
height:20, width:20}
]
}
})
</SCRIPT>
</BODY>
</HTML>
Add rows to a ListGrid
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are
licensed under the terms of the GNU Lesser General Public License, version 3.
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL,
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge,
but may not be used as part of screen designs separate from SmartClient components without a purchase
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008.
-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->
<HTML><HEAD>
<SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Calendar.js></SCRIPT>
<SCRIPT SRC=isomorphic/skins/standard/load_skin.js></SCRIPT>
</HEAD><BODY BGCOLOR="silver">
<SCRIPT>
countryData = [
{
continent:"North America",
countryName:"United States",
countryCode:"US",
area:9631420,
population:298444215,
gdp:12360.0,
independence:new Date(1776,6,4),
government:"federal republic",
government_desc:2,
capital:"Washington, DC",
member_g8:true,
article:"http://en.wikipedia.org/wiki/United_states"
},
{
continent:"Asia",
countryName:"China",
countryCode:"CH",
area:9596960,
population:1313973713,
gdp:8859.0,
government:"Communist state",
government_desc:0,
capital:"Beijing",
member_g8:false,
article:"http://en.wikipedia.org/wiki/China"
},
{
continent:"Asia",
countryName:"Japan",
countryCode:"JA",
area:377835,
population:127463611,
gdp:4018.0,
government:"constitutional monarchy with parliamentary government",
government_desc:1,
capital:"Tokyo",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Japan"
},
{
continent:"Asia",
countryName:"India",
countryCode:"IN",
area:3287590,
population:1095351995,
gdp:3611.0,
independence:new Date(1947,7,15),
government:"federal republic",
government_desc:2,
capital:"New Delhi",
member_g8:false,
article:"http://en.wikipedia.org/wiki/India"
},
{
continent:"Europe",
countryName:"Germany",
countryCode:"GM",
area:357021,
population:82422299,
gdp:2504.0,
independence:new Date(1871,0,18),
government:"federal republic",
government_desc:2,
capital:"Berlin",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Germany"
},
{
continent:"Europe",
countryName:"United Kingdom",
countryCode:"UK",
area:244820,
population:60609153,
gdp:1830.0,
independence:new Date(1801,0,1),
government:"constitutional monarchy",
government_desc:1,
capital:"London",
member_g8:true,
article:"http://en.wikipedia.org/wiki/United_kingdom"
},
{
continent:"Europe",
countryName:"France",
countryCode:"FR",
area:547030,
population:60876136,
gdp:1816.0,
government:"republic",
government_desc:5,
capital:"Paris",
member_g8:true,
article:"http://en.wikipedia.org/wiki/France"
},
{
continent:"Europe",
countryName:"Italy",
countryCode:"IT",
area:301230,
population:58133509,
gdp:1698.0,
independence:new Date(1861,2,17),
government:"republic",
government_desc:5,
capital:"Rome",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Italy"
},
{
continent:"Asia",
countryName:"Russia",
countryCode:"RS",
area:17075200,
population:142893540,
gdp:1589.0,
independence:new Date(1991,7,24),
government:"federation",
government_desc:3,
capital:"Moscow",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Russia"
},
{
continent:"South America",
countryName:"Brazil",
countryCode:"BR",
area:8511965,
population:188078227,
gdp:1556.0,
independence:new Date(1822,8,7),
government:"federative republic",
government_desc:3,
capital:"Brasilia",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Brazil"
},
{
continent:"North America",
countryName:"Canada",
countryCode:"CA",
area:9984670,
population:33098932,
gdp:1114.0,
independence:new Date(1867,6,1),
government:"constitutional monarchy with parliamentary democracy and federation",
government_desc:1,
capital:"Ottawa",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Canada"
},
{
continent:"North America",
countryName:"Mexico",
countryCode:"MX",
area:1972550,
population:107449525,
gdp:1067.0,
independence:new Date(1810,8,16),
government:"federal republic",
government_desc:2,
capital:"Mexico (Distrito Federal)",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Mexico"
},
{
continent:"Europe",
countryName:"Spain",
countryCode:"SP",
area:504782,
population:40397842,
gdp:1029.0,
independence:new Date(1492,0,1),
government:"parliamentary monarchy",
government_desc:4,
capital:"Madrid",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Spain"
},
{
continent:"Asia",
countryName:"South Korea",
countryCode:"KS",
area:98480,
population:48846823,
gdp:965.3,
independence:new Date(1945,7,15),
government:"republic",
government_desc:5,
capital:"Seoul",
member_g8:false,
article:"http://en.wikipedia.org/wiki/South_korea"
},
{
continent:"Asia",
countryName:"Indonesia",
countryCode:"ID",
area:1919440,
population:245452739,
gdp:865.6,
independence:new Date(1945,7,17),
government:"republic",
government_desc:5,
capital:"Jakarta",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Indonesia"
}
]
isc.ListGrid.create({
ID: "countryList",
width:500, height:224, alternateRecordStyles:true,
data: countryData,
fields:[
{name:"countryCode", title:"Flag", width:50, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png"},
{name:"countryName", title:"Country"},
{name:"capital", title:"Capital"},
{name:"continent", title:"Continent"}
]
})
isc.IButton.create({
title:"Add EU (top)",
left:0, top:240, width:150,
click: function () {
countryList.data.addAt(
{countryCode:"EU", countryName:"European Union", capital:"Brussels", continent:"Europe"},
0 // first position in the data set
)
}
})
isc.IButton.create({
title:"Add Australia (bottom)",
left:170, top:240, width:150,
click: function () {
countryList.data.add( // add() defaults to last position in the data set
{countryCode:"AS", countryName:"Australia", capital:"Canberra", continent:"Australia/Oceania"}
)
}
})
</SCRIPT>
</BODY>
</HTML>
Animated row selection roll over
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are
licensed under the terms of the GNU Lesser General Public License, version 3.
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL,
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge,
but may not be used as part of screen designs separate from SmartClient components without a purchase
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008.
-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->
<HTML><HEAD>
<SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Calendar.js></SCRIPT>
<SCRIPT SRC=isomorphic/skins/standard/load_skin.js></SCRIPT>
</HEAD><BODY BGCOLOR="silver">
<SCRIPT>
countryData = [
{
continent:"North America",
countryName:"United States",
countryCode:"US",
area:9631420,
population:298444215,
gdp:12360.0,
independence:new Date(1776,6,4),
government:"federal republic",
government_desc:2,
capital:"Washington, DC",
member_g8:true,
article:"http://en.wikipedia.org/wiki/United_states"
},
{
continent:"Asia",
countryName:"China",
countryCode:"CH",
area:9596960,
population:1313973713,
gdp:8859.0,
government:"Communist state",
government_desc:0,
capital:"Beijing",
member_g8:false,
article:"http://en.wikipedia.org/wiki/China"
},
{
continent:"Asia",
countryName:"Japan",
countryCode:"JA",
area:377835,
population:127463611,
gdp:4018.0,
government:"constitutional monarchy with parliamentary government",
government_desc:1,
capital:"Tokyo",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Japan"
},
{
continent:"Asia",
countryName:"India",
countryCode:"IN",
area:3287590,
population:1095351995,
gdp:3611.0,
independence:new Date(1947,7,15),
government:"federal republic",
government_desc:2,
capital:"New Delhi",
member_g8:false,
article:"http://en.wikipedia.org/wiki/India"
},
{
continent:"Europe",
countryName:"Germany",
countryCode:"GM",
area:357021,
population:82422299,
gdp:2504.0,
independence:new Date(1871,0,18),
government:"federal republic",
government_desc:2,
capital:"Berlin",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Germany"
},
{
continent:"Europe",
countryName:"United Kingdom",
countryCode:"UK",
area:244820,
population:60609153,
gdp:1830.0,
independence:new Date(1801,0,1),
government:"constitutional monarchy",
government_desc:1,
capital:"London",
member_g8:true,
article:"http://en.wikipedia.org/wiki/United_kingdom"
},
{
continent:"Europe",
countryName:"France",
countryCode:"FR",
area:547030,
population:60876136,
gdp:1816.0,
government:"republic",
government_desc:5,
capital:"Paris",
member_g8:true,
article:"http://en.wikipedia.org/wiki/France"
},
{
continent:"Europe",
countryName:"Italy",
countryCode:"IT",
area:301230,
population:58133509,
gdp:1698.0,
independence:new Date(1861,2,17),
government:"republic",
government_desc:5,
capital:"Rome",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Italy"
},
{
continent:"Asia",
countryName:"Russia",
countryCode:"RS",
area:17075200,
population:142893540,
gdp:1589.0,
independence:new Date(1991,7,24),
government:"federation",
government_desc:3,
capital:"Moscow",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Russia"
},
{
continent:"South America",
countryName:"Brazil",
countryCode:"BR",
area:8511965,
population:188078227,
gdp:1556.0,
independence:new Date(1822,8,7),
government:"federative republic",
government_desc:3,
capital:"Brasilia",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Brazil"
},
{
continent:"North America",
countryName:"Canada",
countryCode:"CA",
area:9984670,
population:33098932,
gdp:1114.0,
independence:new Date(1867,6,1),
government:"constitutional monarchy with parliamentary democracy and federation",
government_desc:1,
capital:"Ottawa",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Canada"
},
{
continent:"North America",
countryName:"Mexico",
countryCode:"MX",
area:1972550,
population:107449525,
gdp:1067.0,
independence:new Date(1810,8,16),
government:"federal republic",
government_desc:2,
capital:"Mexico (Distrito Federal)",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Mexico"
},
{
continent:"Europe",
countryName:"Spain",
countryCode:"SP",
area:504782,
population:40397842,
gdp:1029.0,
independence:new Date(1492,0,1),
government:"parliamentary monarchy",
government_desc:4,
capital:"Madrid",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Spain"
},
{
continent:"Asia",
countryName:"South Korea",
countryCode:"KS",
area:98480,
population:48846823,
gdp:965.3,
independence:new Date(1945,7,15),
government:"republic",
government_desc:5,
capital:"Seoul",
member_g8:false,
article:"http://en.wikipedia.org/wiki/South_korea"
},
{
continent:"Asia",
countryName:"Indonesia",
countryCode:"ID",
area:1919440,
population:245452739,
gdp:865.6,
independence:new Date(1945,7,17),
government:"republic",
government_desc:5,
capital:"Jakarta",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Indonesia"
}
]
isc.DataSource.create({
ID: "countryDS",
fields:[
{name:"countryCode", title:"Code"},
{name:"countryName", title:"Country"},
{name:"capital", title:"Capital"}
],
clientOnly: true,
testData: countryData
})
isc.ListGrid.create({
ID:"countryList",
width:500, height:224,
data: countryData,
selectionType:"single",
fields:[
{name:"countryCode", title:"Flag", width:50, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png"},
{name:"countryName", title:"Country"},
{name:"capital", title:"Capital"},
{name:"continent", title:"Continent"}
],
baseStyle:"simpleCell",
showSelectionCanvas:true,
animateSelectionUnder:true,
selectionUnderCanvasProperties:{
animateShowEffect:"fade",
animateFadeTime:1000,
backgroundColor:"#ffff40"
},
showRollOverCanvas:true,
animateRollUnder:true,
rollUnderCanvasProperties:{
animateShowEffect:"fade",
animateFadeTime:1000,
backgroundColor:"#00ffff",
opacity:50
}
})</SCRIPT>
</BODY>
</HTML>
Disable rows
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are
licensed under the terms of the GNU Lesser General Public License, version 3.
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL,
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge,
but may not be used as part of screen designs separate from SmartClient components without a purchase
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008.
-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->
<HTML><HEAD>
<SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Calendar.js></SCRIPT>
<SCRIPT SRC=isomorphic/skins/standard/load_skin.js></SCRIPT>
</HEAD>
<BODY BGCOLOR="silver">
<SCRIPT>
countryData = [
{
continent:"North America",
countryName:"United States",
countryCode:"US",
area:9631420,
population:298444215,
gdp:12360.0,
independence:new Date(1776,6,4),
government:"federal republic",
government_desc:2,
capital:"Washington, DC",
member_g8:true,
article:"http://en.wikipedia.org/wiki/United_states"
},
{
continent:"Asia",
countryName:"China",
countryCode:"CH",
area:9596960,
population:1313973713,
gdp:8859.0,
government:"Communist state",
government_desc:0,
capital:"Beijing",
member_g8:false,
article:"http://en.wikipedia.org/wiki/China"
},
{
continent:"Asia",
countryName:"Japan",
countryCode:"JA",
area:377835,
population:127463611,
gdp:4018.0,
government:"constitutional monarchy with parliamentary government",
government_desc:1,
capital:"Tokyo",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Japan"
},
{
continent:"Asia",
countryName:"India",
countryCode:"IN",
area:3287590,
population:1095351995,
gdp:3611.0,
independence:new Date(1947,7,15),
government:"federal republic",
government_desc:2,
capital:"New Delhi",
member_g8:false,
article:"http://en.wikipedia.org/wiki/India"
},
{
continent:"Europe",
countryName:"Germany",
countryCode:"GM",
area:357021,
population:82422299,
gdp:2504.0,
independence:new Date(1871,0,18),
government:"federal republic",
government_desc:2,
capital:"Berlin",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Germany"
},
{
continent:"Europe",
countryName:"United Kingdom",
countryCode:"UK",
area:244820,
population:60609153,
gdp:1830.0,
independence:new Date(1801,0,1),
government:"constitutional monarchy",
government_desc:1,
capital:"London",
member_g8:true,
article:"http://en.wikipedia.org/wiki/United_kingdom"
},
{
continent:"Europe",
countryName:"France",
countryCode:"FR",
area:547030,
population:60876136,
gdp:1816.0,
government:"republic",
government_desc:5,
capital:"Paris",
member_g8:true,
article:"http://en.wikipedia.org/wiki/France"
},
{
continent:"Europe",
countryName:"Italy",
countryCode:"IT",
area:301230,
population:58133509,
gdp:1698.0,
independence:new Date(1861,2,17),
government:"republic",
government_desc:5,
capital:"Rome",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Italy"
},
{
continent:"Asia",
countryName:"Russia",
countryCode:"RS",
area:17075200,
population:142893540,
gdp:1589.0,
independence:new Date(1991,7,24),
government:"federation",
government_desc:3,
capital:"Moscow",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Russia"
},
{
continent:"South America",
countryName:"Brazil",
countryCode:"BR",
area:8511965,
population:188078227,
gdp:1556.0,
independence:new Date(1822,8,7),
government:"federative republic",
government_desc:3,
capital:"Brasilia",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Brazil"
},
{
continent:"North America",
countryName:"Canada",
countryCode:"CA",
area:9984670,
population:33098932,
gdp:1114.0,
independence:new Date(1867,6,1),
government:"constitutional monarchy with parliamentary democracy and federation",
government_desc:1,
capital:"Ottawa",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Canada"
},
{
continent:"North America",
countryName:"Mexico",
countryCode:"MX",
area:1972550,
population:107449525,
gdp:1067.0,
independence:new Date(1810,8,16),
government:"federal republic",
government_desc:2,
capital:"Mexico (Distrito Federal)",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Mexico"
},
{
continent:"Europe",
countryName:"Spain",
countryCode:"SP",
area:504782,
population:40397842,
gdp:1029.0,
independence:new Date(1492,0,1),
government:"parliamentary monarchy",
government_desc:4,
capital:"Madrid",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Spain"
},
{
continent:"Asia",
countryName:"South Korea",
countryCode:"KS",
area:98480,
population:48846823,
gdp:965.3,
independence:new Date(1945,7,15),
government:"republic",
government_desc:5,
capital:"Seoul",
member_g8:false,
article:"http://en.wikipedia.org/wiki/South_korea"
},
{
continent:"Asia",
countryName:"Indonesia",
countryCode:"ID",
area:1919440,
population:245452739,
gdp:865.6,
independence:new Date(1945,7,17),
government:"republic",
government_desc:5,
capital:"Jakarta",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Indonesia"
}
]
isc.DataSource.create({
ID: "countryDS",
fields:[
{name:"countryCode", title:"Code"},
{name:"countryName", title:"Country"},
{name:"capital", title:"Capital"}
],
clientOnly: true,
testData: countryData
})
// disable all continent:"Europe" rows
countryData.findAll("continent", "Europe").setProperty("enabled", false);
isc.ListGrid.create({
ID: "countryList",
width:500, height:224, alternateRecordStyles:true,
data: countryData,
fields:[
{name:"countryCode", title:"Flag", width:50, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png"},
{name:"countryName", title:"Country"},
{name:"capital", title:"Capital"},
{name:"continent", title:"Continent"}
],
canReorderRecords: true
})
</SCRIPT>
</BODY>
</HTML>
Expandable table row
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are
licensed under the terms of the GNU Lesser General Public License, version 3.
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL,
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge,
but may not be used as part of screen designs separate from SmartClient components without a purchase
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008.
-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->
<HTML><HEAD>
<SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
<SCRIPT SRC=isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY BGCOLOR="papayawhip" MARGINHEIGHT=0 MARGINWIDTH=0 LEFTMARGIN=0 TOPMARGIN=0>
<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=5 BORDER=0><TR><TD CLASS=pageHeader BGCOLOR=WHITE>
Editable ListGrid example
</TD><TD CLASS=pageHeader ALIGN=RIGHT BGCOLOR=WHITE>
Isomorphic SmartClient
</TD></TR></TABLE><TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=0 BORDER=0><TR>
<TD BGCOLOR=336666><IMG SRC=images/blank.gif WIDTH=1 HEIGHT=4></TD></TR></TABLE>
<!--------------------------
Example code starts here
---------------------------->
<SCRIPT>
// Data to be displayed
var animalData = [
{commonName:"Elephant (African)",scientificName:"Loxodonta africana",diet:"H",lifeSpan:" 40-60 years",information:"The African Elephant is the largest of all land animals and also has the biggest brain of any land animal. Both males and females have ivory tusks. Elephants are also wonderful swimmers. Man is the only real enemy of the elephant. Man threatens the elephant by killing it for its tusks and by destroying its habitat.",status:"Threatened"},
{enabled:false, commonName:"(disabled) Alligator (American)",scientificName:"Alligator mississippiensis",diet:"C",lifeSpan:"50 years",information:"In the 16th century, Spanish explorers in what is now Florida encountered a large formidable animal which they called "el largo" meaning "the lizard". The name "el largo" gradually became pronounced "alligator".",status:"Not Endangered"},
{commonName:"Anteater",scientificName:"Myrmecophaga tridactyla",diet:"C",lifeSpan:"25 years",information:"Anteaters can eat up to 35,000 ants daily. Tongue is around 2 feet long and is not sticky but rather covered with saliva. They have very strong sharp claws used for digging up anthills and termite mounds.",status:"Not Endangered"},
{commonName:"Camel (Arabian Dromedary)",scientificName:"Camelus dromedarius",diet:"H",lifeSpan:"20-50 years",information:"Can eat any vegetation including thorns. Has one hump for fat storage. Is well known as a beast of burden.",status:"Not Endangered"},
{commonName:"Bald Eagle",scientificName:"southern subspecies: Haliaeetus leucocephalus leuc",diet:"C",lifeSpan:"Up to 50 years",information:" Females lay one to three eggs. Visual acuity is 3-4 times greater than a human. Bald eagles build the largest nest of any North American bird. The largest nest found was 3.2 yds (2.9 m) in diameter and 6.7 yds (6.1 m) tall. Protection of the Bald Eagle is afforded by three federal laws: (1) the Endangered Species Act, (2) the Bald Eagle and Golden Eagle Protection Act, and (3) the Migratory Bird Treaty Act.",status:"Endangered"},
{commonName:"Black Spider Monkey",scientificName:"Ateles panicus",diet:"H",lifeSpan:"20 years",information:"They can perform remarkable feats with their tails.",status:"Not Endangered"},
{commonName:"Bottlenosed Dolphin",scientificName:"Tursiops truncatus",diet:"C",lifeSpan:"35 years",information:"The bottlenosed dolphin is classified as a toothed whale. They are excellent hunters. They use sound waves to "see" their environment and where they are going through a process known as echolocation.",status:"Dolphins are vulnerable to commercial fishing practices and ocean pollution."}
];
var animalFields = [
{name:"commonName", title:"Animal"},
{name:"scientificName", title:"Sci. Name (not editable)", canEdit:false, width:150},
{name:"diet", title:"Diet", valueMap:{O:"Omnivore", C:"Carnivore", H:"Herbivore",I:"Insectivore",P:"Pescivore"}},
{name:"information", title:"Interesting Facts", editorType:"textArea"}
];
ListGrid.create({
ID:"animalList",
canEdit:true,
data:animalData,
fields:animalFields,
canReorderRecords:true,
left:50,
top:75,
width:500,
height:300,
alternateRecordStyles:true
});
</SCRIPT>
</BODY>
</HTML>
Mass row update
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are
licensed under the terms of the GNU Lesser General Public License, version 3.
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL,
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge,
but may not be used as part of screen designs separate from SmartClient components without a purchase
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008.
-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->
<HTML><HEAD>
<SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Calendar.js></SCRIPT>
<SCRIPT SRC=isomorphic/skins/standard/load_skin.js></SCRIPT>
</HEAD><BODY BGCOLOR="silver">
<SCRIPT>
countryData = [
{
continent:"North America",
countryName:"United States",
countryCode:"US",
area:9631420,
population:298444215,
gdp:12360.0,
independence:new Date(1776,6,4),
government:"federal republic",
government_desc:2,
capital:"Washington, DC",
member_g8:true,
article:"http://en.wikipedia.org/wiki/United_states"
},
{
continent:"Asia",
countryName:"China",
countryCode:"CH",
area:9596960,
population:1313973713,
gdp:8859.0,
government:"Communist state",
government_desc:0,
capital:"Beijing",
member_g8:false,
article:"http://en.wikipedia.org/wiki/China"
},
{
continent:"Asia",
countryName:"Japan",
countryCode:"JA",
area:377835,
population:127463611,
gdp:4018.0,
government:"constitutional monarchy with parliamentary government",
government_desc:1,
capital:"Tokyo",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Japan"
},
{
continent:"Asia",
countryName:"India",
countryCode:"IN",
area:3287590,
population:1095351995,
gdp:3611.0,
independence:new Date(1947,7,15),
government:"federal republic",
government_desc:2,
capital:"New Delhi",
member_g8:false,
article:"http://en.wikipedia.org/wiki/India"
},
{
continent:"Europe",
countryName:"Germany",
countryCode:"GM",
area:357021,
population:82422299,
gdp:2504.0,
independence:new Date(1871,0,18),
government:"federal republic",
government_desc:2,
capital:"Berlin",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Germany"
},
{
continent:"Europe",
countryName:"United Kingdom",
countryCode:"UK",
area:244820,
population:60609153,
gdp:1830.0,
independence:new Date(1801,0,1),
government:"constitutional monarchy",
government_desc:1,
capital:"London",
member_g8:true,
article:"http://en.wikipedia.org/wiki/United_kingdom"
},
{
continent:"Europe",
countryName:"France",
countryCode:"FR",
area:547030,
population:60876136,
gdp:1816.0,
government:"republic",
government_desc:5,
capital:"Paris",
member_g8:true,
article:"http://en.wikipedia.org/wiki/France"
},
{
continent:"Europe",
countryName:"Italy",
countryCode:"IT",
area:301230,
population:58133509,
gdp:1698.0,
independence:new Date(1861,2,17),
government:"republic",
government_desc:5,
capital:"Rome",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Italy"
},
{
continent:"Asia",
countryName:"Russia",
countryCode:"RS",
area:17075200,
population:142893540,
gdp:1589.0,
independence:new Date(1991,7,24),
government:"federation",
government_desc:3,
capital:"Moscow",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Russia"
},
{
continent:"South America",
countryName:"Brazil",
countryCode:"BR",
area:8511965,
population:188078227,
gdp:1556.0,
independence:new Date(1822,8,7),
government:"federative republic",
government_desc:3,
capital:"Brasilia",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Brazil"
},
{
continent:"North America",
countryName:"Canada",
countryCode:"CA",
area:9984670,
population:33098932,
gdp:1114.0,
independence:new Date(1867,6,1),
government:"constitutional monarchy with parliamentary democracy and federation",
government_desc:1,
capital:"Ottawa",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Canada"
},
{
continent:"North America",
countryName:"Mexico",
countryCode:"MX",
area:1972550,
population:107449525,
gdp:1067.0,
independence:new Date(1810,8,16),
government:"federal republic",
government_desc:2,
capital:"Mexico (Distrito Federal)",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Mexico"
},
{
continent:"Europe",
countryName:"Spain",
countryCode:"SP",
area:504782,
population:40397842,
gdp:1029.0,
independence:new Date(1492,0,1),
government:"parliamentary monarchy",
government_desc:4,
capital:"Madrid",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Spain"
},
{
continent:"Asia",
countryName:"South Korea",
countryCode:"KS",
area:98480,
population:48846823,
gdp:965.3,
independence:new Date(1945,7,15),
government:"republic",
government_desc:5,
capital:"Seoul",
member_g8:false,
article:"http://en.wikipedia.org/wiki/South_korea"
},
{
continent:"Asia",
countryName:"Indonesia",
countryCode:"ID",
area:1919440,
population:245452739,
gdp:865.6,
independence:new Date(1945,7,17),
government:"republic",
government_desc:5,
capital:"Jakarta",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Indonesia"
}
]
isc.DataSource.create({
ID: "countryDS",
fields:[
{name:"countryCode", title:"Code"},
{name:"countryName", title:"Country"},
{name:"capital", title:"Capital"}
],
clientOnly: true,
testData: countryData
})
isc.ListGrid.create({
ID: "countryList",
width:500, height:224, alternateRecordStyles:true, cellHeight:22,
// use server-side dataSource so edits are retained across page transitions
dataSource: countryDS,
// display a subset of fields from the datasource
fields:[
{name:"countryName"},
{name:"continent"},
{name:"member_g8"},
{name:"population",
formatCellValue:"isc.Format.toUSString(parseInt(value))"},
{name:"independence"}
],
autoFetchData: true,
canEdit: true,
editEvent: "click",
listEndEditAction: "next",
autoSaveEdits: false
})
isc.IButton.create({
top:250,
title:"Edit New",
click:"countryList.startEditingNew()"
});
isc.IButton.create({
top:250, left: 110,
title:"Save",
click:"countryList.saveAllEdits()"
});
isc.IButton.create({
top:250, left: 220,
title:"Discard",
click:"countryList.discardAllEdits()"
});
</SCRIPT>
</BODY>
</HTML>
Remove selected rows from ListGrid
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are
licensed under the terms of the GNU Lesser General Public License, version 3.
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL,
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge,
but may not be used as part of screen designs separate from SmartClient components without a purchase
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008.
-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->
<HTML><HEAD>
<SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Calendar.js></SCRIPT>
<SCRIPT SRC=isomorphic/skins/standard/load_skin.js></SCRIPT>
</HEAD><BODY BGCOLOR="silver">
<SCRIPT>
countryData = [
{
continent:"North America",
countryName:"United States",
countryCode:"US",
area:9631420,
population:298444215,
gdp:12360.0,
independence:new Date(1776,6,4),
government:"federal republic",
government_desc:2,
capital:"Washington, DC",
member_g8:true,
article:"http://en.wikipedia.org/wiki/United_states"
},
{
continent:"Asia",
countryName:"China",
countryCode:"CH",
area:9596960,
population:1313973713,
gdp:8859.0,
government:"Communist state",
government_desc:0,
capital:"Beijing",
member_g8:false,
article:"http://en.wikipedia.org/wiki/China"
},
{
continent:"Asia",
countryName:"Japan",
countryCode:"JA",
area:377835,
population:127463611,
gdp:4018.0,
government:"constitutional monarchy with parliamentary government",
government_desc:1,
capital:"Tokyo",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Japan"
},
{
continent:"Asia",
countryName:"India",
countryCode:"IN",
area:3287590,
population:1095351995,
gdp:3611.0,
independence:new Date(1947,7,15),
government:"federal republic",
government_desc:2,
capital:"New Delhi",
member_g8:false,
article:"http://en.wikipedia.org/wiki/India"
},
{
continent:"Europe",
countryName:"Germany",
countryCode:"GM",
area:357021,
population:82422299,
gdp:2504.0,
independence:new Date(1871,0,18),
government:"federal republic",
government_desc:2,
capital:"Berlin",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Germany"
},
{
continent:"Europe",
countryName:"United Kingdom",
countryCode:"UK",
area:244820,
population:60609153,
gdp:1830.0,
independence:new Date(1801,0,1),
government:"constitutional monarchy",
government_desc:1,
capital:"London",
member_g8:true,
article:"http://en.wikipedia.org/wiki/United_kingdom"
},
{
continent:"Europe",
countryName:"France",
countryCode:"FR",
area:547030,
population:60876136,
gdp:1816.0,
government:"republic",
government_desc:5,
capital:"Paris",
member_g8:true,
article:"http://en.wikipedia.org/wiki/France"
},
{
continent:"Europe",
countryName:"Italy",
countryCode:"IT",
area:301230,
population:58133509,
gdp:1698.0,
independence:new Date(1861,2,17),
government:"republic",
government_desc:5,
capital:"Rome",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Italy"
},
{
continent:"Asia",
countryName:"Russia",
countryCode:"RS",
area:17075200,
population:142893540,
gdp:1589.0,
independence:new Date(1991,7,24),
government:"federation",
government_desc:3,
capital:"Moscow",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Russia"
},
{
continent:"South America",
countryName:"Brazil",
countryCode:"BR",
area:8511965,
population:188078227,
gdp:1556.0,
independence:new Date(1822,8,7),
government:"federative republic",
government_desc:3,
capital:"Brasilia",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Brazil"
},
{
continent:"North America",
countryName:"Canada",
countryCode:"CA",
area:9984670,
population:33098932,
gdp:1114.0,
independence:new Date(1867,6,1),
government:"constitutional monarchy with parliamentary democracy and federation",
government_desc:1,
capital:"Ottawa",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Canada"
},
{
continent:"North America",
countryName:"Mexico",
countryCode:"MX",
area:1972550,
population:107449525,
gdp:1067.0,
independence:new Date(1810,8,16),
government:"federal republic",
government_desc:2,
capital:"Mexico (Distrito Federal)",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Mexico"
},
{
continent:"Europe",
countryName:"Spain",
countryCode:"SP",
area:504782,
population:40397842,
gdp:1029.0,
independence:new Date(1492,0,1),
government:"parliamentary monarchy",
government_desc:4,
capital:"Madrid",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Spain"
},
{
continent:"Asia",
countryName:"South Korea",
countryCode:"KS",
area:98480,
population:48846823,
gdp:965.3,
independence:new Date(1945,7,15),
government:"republic",
government_desc:5,
capital:"Seoul",
member_g8:false,
article:"http://en.wikipedia.org/wiki/South_korea"
},
{
continent:"Asia",
countryName:"Indonesia",
countryCode:"ID",
area:1919440,
population:245452739,
gdp:865.6,
independence:new Date(1945,7,17),
government:"republic",
government_desc:5,
capital:"Jakarta",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Indonesia"
}
]
isc.ListGrid.create({
ID: "countryList",
width:500, height:224, alternateRecordStyles:true,
data: countryData,
fields:[
{name:"countryCode", title:"Flag", width:50, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png"},
{name:"countryName", title:"Country"},
{name:"capital", title:"Capital"},
{name:"continent", title:"Continent"}
]
})
isc.IButton.create({
left:0, top:240, width:140,
title:"Remove first",
click:"countryList.data.remove(countryList.data.get(0))"
})
isc.IButton.create({
left:160, top:240, width:140,
title:"Remove first selected",
click:"countryList.data.remove(countryList.getSelectedRecord())"
})
isc.IButton.create({
left:320, top:240, width:140,
title:"Remove all selected",
click:"countryList.data.removeList(countryList.getSelection())"
})
countryList.selectRecord(0); // select first record automatically
</SCRIPT>
</BODY>
</HTML>
Rollover recticle
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are
licensed under the terms of the GNU Lesser General Public License, version 3.
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL,
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge,
but may not be used as part of screen designs separate from SmartClient components without a purchase
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008.
-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->
<HTML><HEAD>
<SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Calendar.js></SCRIPT>
<SCRIPT SRC=isomorphic/skins/standard/load_skin.js></SCRIPT>
</HEAD>
<BODY BGCOLOR="silver">
<SCRIPT>
countryData = [
{
continent:"North America",
countryName:"United States",
countryCode:"US",
area:9631420,
population:298444215,
gdp:12360.0,
independence:new Date(1776,6,4),
government:"federal republic",
government_desc:2,
capital:"Washington, DC",
member_g8:true,
article:"http://en.wikipedia.org/wiki/United_states"
},
{
continent:"Asia",
countryName:"China",
countryCode:"CH",
area:9596960,
population:1313973713,
gdp:8859.0,
government:"Communist state",
government_desc:0,
capital:"Beijing",
member_g8:false,
article:"http://en.wikipedia.org/wiki/China"
},
{
continent:"Asia",
countryName:"Japan",
countryCode:"JA",
area:377835,
population:127463611,
gdp:4018.0,
government:"constitutional monarchy with parliamentary government",
government_desc:1,
capital:"Tokyo",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Japan"
},
{
continent:"Asia",
countryName:"India",
countryCode:"IN",
area:3287590,
population:1095351995,
gdp:3611.0,
independence:new Date(1947,7,15),
government:"federal republic",
government_desc:2,
capital:"New Delhi",
member_g8:false,
article:"http://en.wikipedia.org/wiki/India"
},
{
continent:"Europe",
countryName:"Germany",
countryCode:"GM",
area:357021,
population:82422299,
gdp:2504.0,
independence:new Date(1871,0,18),
government:"federal republic",
government_desc:2,
capital:"Berlin",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Germany"
},
{
continent:"Europe",
countryName:"United Kingdom",
countryCode:"UK",
area:244820,
population:60609153,
gdp:1830.0,
independence:new Date(1801,0,1),
government:"constitutional monarchy",
government_desc:1,
capital:"London",
member_g8:true,
article:"http://en.wikipedia.org/wiki/United_kingdom"
},
{
continent:"Europe",
countryName:"France",
countryCode:"FR",
area:547030,
population:60876136,
gdp:1816.0,
government:"republic",
government_desc:5,
capital:"Paris",
member_g8:true,
article:"http://en.wikipedia.org/wiki/France"
},
{
continent:"Europe",
countryName:"Italy",
countryCode:"IT",
area:301230,
population:58133509,
gdp:1698.0,
independence:new Date(1861,2,17),
government:"republic",
government_desc:5,
capital:"Rome",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Italy"
},
{
continent:"Asia",
countryName:"Russia",
countryCode:"RS",
area:17075200,
population:142893540,
gdp:1589.0,
independence:new Date(1991,7,24),
government:"federation",
government_desc:3,
capital:"Moscow",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Russia"
},
{
continent:"South America",
countryName:"Brazil",
countryCode:"BR",
area:8511965,
population:188078227,
gdp:1556.0,
independence:new Date(1822,8,7),
government:"federative republic",
government_desc:3,
capital:"Brasilia",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Brazil"
},
{
continent:"North America",
countryName:"Canada",
countryCode:"CA",
area:9984670,
population:33098932,
gdp:1114.0,
independence:new Date(1867,6,1),
government:"constitutional monarchy with parliamentary democracy and federation",
government_desc:1,
capital:"Ottawa",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Canada"
},
{
continent:"North America",
countryName:"Mexico",
countryCode:"MX",
area:1972550,
population:107449525,
gdp:1067.0,
independence:new Date(1810,8,16),
government:"federal republic",
government_desc:2,
capital:"Mexico (Distrito Federal)",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Mexico"
},
{
continent:"Europe",
countryName:"Spain",
countryCode:"SP",
area:504782,
population:40397842,
gdp:1029.0,
independence:new Date(1492,0,1),
government:"parliamentary monarchy",
government_desc:4,
capital:"Madrid",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Spain"
},
{
continent:"Asia",
countryName:"South Korea",
countryCode:"KS",
area:98480,
population:48846823,
gdp:965.3,
independence:new Date(1945,7,15),
government:"republic",
government_desc:5,
capital:"Seoul",
member_g8:false,
article:"http://en.wikipedia.org/wiki/South_korea"
},
{
continent:"Asia",
countryName:"Indonesia",
countryCode:"ID",
area:1919440,
population:245452739,
gdp:865.6,
independence:new Date(1945,7,17),
government:"republic",
government_desc:5,
capital:"Jakarta",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Indonesia"
}
]
isc.DataSource.create({
ID: "countryDS",
fields:[
{name:"countryCode", title:"Code"},
{name:"countryName", title:"Country"},
{name:"capital", title:"Capital"}
],
clientOnly: true,
testData: countryData
})
isc.ListGrid.create({
ID:"countryList",
width:500, height:224,
data: countryData,
selectionType:"single",
fields:[
{name:"countryCode", title:"Flag", width:50, align:"right",
type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png"},
{name:"countryName", title:"Country"},
{name:"capital", title:"Capital"},
{name:"continent", title:"Continent"}
],
cellHeight:22,
showRollOverCanvas:true,
rollOverCanvasConstructor:isc.StretchImg,
rollOverCanvasProperties:{
vertical:false, capSize:7,
src:"other/cellOverRecticle.png"
}
})
</SCRIPT>
</BODY>
</HTML>
Rounded row selection
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are
licensed under the terms of the GNU Lesser General Public License, version 3.
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL,
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge,
but may not be used as part of screen designs separate from SmartClient components without a purchase
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008.
-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->
<HTML><HEAD>
<SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Calendar.js></SCRIPT>
<SCRIPT SRC=isomorphic/skins/standard/load_skin.js></SCRIPT>
</HEAD>
<BODY BGCOLOR="silver">
<SCRIPT>
countryData = [
{
continent:"North America",
countryName:"United States",
countryCode:"US",
area:9631420,
population:298444215,
gdp:12360.0,
independence:new Date(1776,6,4),
government:"federal republic",
government_desc:2,
capital:"Washington, DC",
member_g8:true,
article:"http://en.wikipedia.org/wiki/United_states"
},
{
continent:"Asia",
countryName:"China",
countryCode:"CH",
area:9596960,
population:1313973713,
gdp:8859.0,
government:"Communist state",
government_desc:0,
capital:"Beijing",
member_g8:false,
article:"http://en.wikipedia.org/wiki/China"
},
{
continent:"Asia",
countryName:"Japan",
countryCode:"JA",
area:377835,
population:127463611,
gdp:4018.0,
government:"constitutional monarchy with parliamentary government",
government_desc:1,
capital:"Tokyo",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Japan"
},
{
continent:"Asia",
countryName:"India",
countryCode:"IN",
area:3287590,
population:1095351995,
gdp:3611.0,
independence:new Date(1947,7,15),
government:"federal republic",
government_desc:2,
capital:"New Delhi",
member_g8:false,
article:"http://en.wikipedia.org/wiki/India"
},
{
continent:"Europe",
countryName:"Germany",
countryCode:"GM",
area:357021,
population:82422299,
gdp:2504.0,
independence:new Date(1871,0,18),
government:"federal republic",
government_desc:2,
capital:"Berlin",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Germany"
},
{
continent:"Europe",
countryName:"United Kingdom",
countryCode:"UK",
area:244820,
population:60609153,
gdp:1830.0,
independence:new Date(1801,0,1),
government:"constitutional monarchy",
government_desc:1,
capital:"London",
member_g8:true,
article:"http://en.wikipedia.org/wiki/United_kingdom"
},
{
continent:"Europe",
countryName:"France",
countryCode:"FR",
area:547030,
population:60876136,
gdp:1816.0,
government:"republic",
government_desc:5,
capital:"Paris",
member_g8:true,
article:"http://en.wikipedia.org/wiki/France"
},
{
continent:"Europe",
countryName:"Italy",
countryCode:"IT",
area:301230,
population:58133509,
gdp:1698.0,
independence:new Date(1861,2,17),
government:"republic",
government_desc:5,
capital:"Rome",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Italy"
},
{
continent:"Asia",
countryName:"Russia",
countryCode:"RS",
area:17075200,
population:142893540,
gdp:1589.0,
independence:new Date(1991,7,24),
government:"federation",
government_desc:3,
capital:"Moscow",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Russia"
},
{
continent:"South America",
countryName:"Brazil",
countryCode:"BR",
area:8511965,
population:188078227,
gdp:1556.0,
independence:new Date(1822,8,7),
government:"federative republic",
government_desc:3,
capital:"Brasilia",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Brazil"
},
{
continent:"North America",
countryName:"Canada",
countryCode:"CA",
area:9984670,
population:33098932,
gdp:1114.0,
independence:new Date(1867,6,1),
government:"constitutional monarchy with parliamentary democracy and federation",
government_desc:1,
capital:"Ottawa",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Canada"
},
{
continent:"North America",
countryName:"Mexico",
countryCode:"MX",
area:1972550,
population:107449525,
gdp:1067.0,
independence:new Date(1810,8,16),
government:"federal republic",
government_desc:2,
capital:"Mexico (Distrito Federal)",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Mexico"
},
{
continent:"Europe",
countryName:"Spain",
countryCode:"SP",
area:504782,
population:40397842,
gdp:1029.0,
independence:new Date(1492,0,1),
government:"parliamentary monarchy",
government_desc:4,
capital:"Madrid",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Spain"
},
{
continent:"Asia",
countryName:"South Korea",
countryCode:"KS",
area:98480,
population:48846823,
gdp:965.3,
independence:new Date(1945,7,15),
government:"republic",
government_desc:5,
capital:"Seoul",
member_g8:false,
article:"http://en.wikipedia.org/wiki/South_korea"
},
{
continent:"Asia",
countryName:"Indonesia",
countryCode:"ID",
area:1919440,
population:245452739,
gdp:865.6,
independence:new Date(1945,7,17),
government:"republic",
government_desc:5,
capital:"Jakarta",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Indonesia"
}
]
isc.DataSource.create({
ID: "countryDS",
fields:[
{name:"countryCode", title:"Code"},
{name:"countryName", title:"Country"},
{name:"capital", title:"Capital"}
],
clientOnly: true,
testData: countryData
})
isc.ListGrid.create({
ID:"countryList",
width:500, height:224,
data: countryData,
selectionType:"single",
fields:[
{name:"countryCode", title:"Flag", width:50, align:"right",
type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png"},
{name:"countryName", title:"Country"},
{name:"capital", title:"Capital"},
{name:"continent", title:"Continent"}
],
baseStyle:"simpleCell",
showRollOver:false, cellHeight:22,
showSelectionCanvas:true,
selectionUnderCanvasConstructor:isc.StretchImg,
selectionUnderCanvasProperties:{
vertical:false,
capSize:7,
src:"other/cellSelected.png"
}
})
</SCRIPT>
</BODY>
</HTML>
Row editing
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are
licensed under the terms of the GNU Lesser General Public License, version 3.
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL,
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge,
but may not be used as part of screen designs separate from SmartClient components without a purchase
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008.
-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->
<HTML><HEAD>
<SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
<SCRIPT SRC=isomorphic/system/modules/ISC_Calendar.js></SCRIPT>
<SCRIPT SRC=isomorphic/skins/standard/load_skin.js></SCRIPT>
</HEAD><BODY BGCOLOR="silver">
<SCRIPT>
countryData = [
{
continent:"North America",
countryName:"United States",
countryCode:"US",
area:9631420,
population:298444215,
gdp:12360.0,
independence:new Date(1776,6,4),
government:"federal republic",
government_desc:2,
capital:"Washington, DC",
member_g8:true,
article:"http://en.wikipedia.org/wiki/United_states"
},
{
continent:"Asia",
countryName:"China",
countryCode:"CH",
area:9596960,
population:1313973713,
gdp:8859.0,
government:"Communist state",
government_desc:0,
capital:"Beijing",
member_g8:false,
article:"http://en.wikipedia.org/wiki/China"
},
{
continent:"Asia",
countryName:"Japan",
countryCode:"JA",
area:377835,
population:127463611,
gdp:4018.0,
government:"constitutional monarchy with parliamentary government",
government_desc:1,
capital:"Tokyo",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Japan"
},
{
continent:"Asia",
countryName:"India",
countryCode:"IN",
area:3287590,
population:1095351995,
gdp:3611.0,
independence:new Date(1947,7,15),
government:"federal republic",
government_desc:2,
capital:"New Delhi",
member_g8:false,
article:"http://en.wikipedia.org/wiki/India"
},
{
continent:"Europe",
countryName:"Germany",
countryCode:"GM",
area:357021,
population:82422299,
gdp:2504.0,
independence:new Date(1871,0,18),
government:"federal republic",
government_desc:2,
capital:"Berlin",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Germany"
},
{
continent:"Europe",
countryName:"United Kingdom",
countryCode:"UK",
area:244820,
population:60609153,
gdp:1830.0,
independence:new Date(1801,0,1),
government:"constitutional monarchy",
government_desc:1,
capital:"London",
member_g8:true,
article:"http://en.wikipedia.org/wiki/United_kingdom"
},
{
continent:"Europe",
countryName:"France",
countryCode:"FR",
area:547030,
population:60876136,
gdp:1816.0,
government:"republic",
government_desc:5,
capital:"Paris",
member_g8:true,
article:"http://en.wikipedia.org/wiki/France"
},
{
continent:"Europe",
countryName:"Italy",
countryCode:"IT",
area:301230,
population:58133509,
gdp:1698.0,
independence:new Date(1861,2,17),
government:"republic",
government_desc:5,
capital:"Rome",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Italy"
},
{
continent:"Asia",
countryName:"Russia",
countryCode:"RS",
area:17075200,
population:142893540,
gdp:1589.0,
independence:new Date(1991,7,24),
government:"federation",
government_desc:3,
capital:"Moscow",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Russia"
},
{
continent:"South America",
countryName:"Brazil",
countryCode:"BR",
area:8511965,
population:188078227,
gdp:1556.0,
independence:new Date(1822,8,7),
government:"federative republic",
government_desc:3,
capital:"Brasilia",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Brazil"
},
{
continent:"North America",
countryName:"Canada",
countryCode:"CA",
area:9984670,
population:33098932,
gdp:1114.0,
independence:new Date(1867,6,1),
government:"constitutional monarchy with parliamentary democracy and federation",
government_desc:1,
capital:"Ottawa",
member_g8:true,
article:"http://en.wikipedia.org/wiki/Canada"
},
{
continent:"North America",
countryName:"Mexico",
countryCode:"MX",
area:1972550,
population:107449525,
gdp:1067.0,
independence:new Date(1810,8,16),
government:"federal republic",
government_desc:2,
capital:"Mexico (Distrito Federal)",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Mexico"
},
{
continent:"Europe",
countryName:"Spain",
countryCode:"SP",
area:504782,
population:40397842,
gdp:1029.0,
independence:new Date(1492,0,1),
government:"parliamentary monarchy",
government_desc:4,
capital:"Madrid",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Spain"
},
{
continent:"Asia",
countryName:"South Korea",
countryCode:"KS",
area:98480,
population:48846823,
gdp:965.3,
independence:new Date(1945,7,15),
government:"republic",
government_desc:5,
capital:"Seoul",
member_g8:false,
article:"http://en.wikipedia.org/wiki/South_korea"
},
{
continent:"Asia",
countryName:"Indonesia",
countryCode:"ID",
area:1919440,
population:245452739,
gdp:865.6,
independence:new Date(1945,7,17),
government:"republic",
government_desc:5,
capital:"Jakarta",
member_g8:false,
article:"http://en.wikipedia.org/wiki/Indonesia"
}
]
isc.DataSource.create({
ID: "countryDS",
fields:[
{name:"countryCode", title:"Code"},
{name:"countryName", title:"Country"},
{name:"capital", title:"Capital"}
],
clientOnly: true,
testData: countryData
})
isc.ListGrid.create({
ID: "countryList",
width:500, height:224, alternateRecordStyles:true, cellHeight:22,
// use server-side dataSource so edits are retained across page transitions
dataSource: countryDS,
// display a subset of fields from the datasource
fields:[
{name:"countryName"},
{name:"continent"},
{name:"member_g8"},
{name:"population",
formatCellValue:"isc.Format.toUSString(parseInt(value))"},
{name:"independence"}
],
autoFetchData: true,
canEdit: true,
editEvent: "click",
listEndEditAction: "next"
})
isc.IButton.create({
top:250,
title:"Edit New",
click:"countryList.startEditingNew()"
});
</SCRIPT>
</BODY>
</HTML>