PDA

View Full Version : Control to integrate ExtJs Grid and Subsonic DAL


rodiniz
07-09-2007, 04:35 PM
Click here (http://www.rodrigodiniz.qsh.eu/ExtGrid.aspx)to see it.There are plans to implement editing and a scaffolding control.

jgarcia@tdg-i.com
07-10-2007, 07:39 AM
What is the point of this post?

Your code doesn't use the control nor is the control available for download. How is this useful to the community?

"For now the code for the control is not avaiable for download"

your grid is using EXTJS code

var reader= new Ext.data.XmlReader({
record: 'ROWS',
totalRecords: 'TotalCount'}, ['TITLE','RATING']);
var ds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({url: location.href}),
reader:reader,remoteSort: true});
var cm = new Ext.grid.ColumnModel([
{header:'TITLE', dataIndex: 'TITLE'}
,
{header:'RATING', dataIndex: 'RATING'}
]);
cm.defaultSortable = true;
grdPaging = new Ext.grid.Grid('ExtGrid1', {ds: ds,
cm: cm,
selModel: new Ext.grid.RowSelectionModel({singleSelect:true}),
enableDragDrop:true});
grdPaging.autosizeColumns = true;
grdPaging.render();

ds.load({params:{start:0, limit:10}});
var gridFoot = grdPaging.getView().getFooterPanel(true);var paging = new Ext.PagingToolbar(gridFoot, ds, {
pageSize: 10,
displayInfo: true,

displayMsg: 'Displaying records {0} - {1} of {2}',
emptyMsg: "No record to display"});})


i don't get it.

rodiniz
07-10-2007, 08:49 AM
The control is avaiable for download there is a link just above the grid, the code you posted is generated by the control.
The only code that is on the page is :
<cc1:ExtGrid width="500" ID="ExtGrid1" TableName="TB_MOVIE" ColumnList="TITLE,RATING" pagesize="10" runat="server" />
You can see with the view source that Ext is included using web resources which means it is inside the control dll.
The control source-code will be available soon.

jgarcia@tdg-i.com
07-10-2007, 03:09 PM
See your source page uses Ext.Grid.grid

i'm confused :(

oh, you might want to change the word "samples" to Examples :)

Sample is not the same as an example.
http://dictionary.reference.com/browse/example
http://dictionary.reference.com/browse/sample



//HTML
<div id="ExtGrid1" style="height:300px;width:500px;">



<script language='JavaScript'>Ext.onReady(function(){
var reader= new Ext.data.XmlReader({
record: 'ROWS',
totalRecords: 'TotalCount'}, ['TITLE','RATING']);
var ds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({url: location.href}),
reader:reader,remoteSort: true});
var cm = new Ext.grid.ColumnModel([
{header:'TITLE', dataIndex: 'TITLE'}
,
{header:'RATING', dataIndex: 'RATING'}
]);
cm.defaultSortable = true;
grdPaging = new Ext.grid.Grid('ExtGrid1', {ds: ds,
cm: cm,
selModel: new Ext.grid.RowSelectionModel({singleSelect:true}),
enableDragDrop:true});
grdPaging.autosizeColumns = true;
grdPaging.render();

ds.load({params:{start:0, limit:10}});
var gridFoot = grdPaging.getView().getFooterPanel(true);var paging = new Ext.PagingToolbar(gridFoot, ds, {
pageSize: 10,
displayInfo: true,

displayMsg: 'Displaying records {0} - {1} of {2}',
emptyMsg: "No record to display"});})
</script>

rodiniz
07-10-2007, 03:40 PM
You put the control and it generates the extjs code for you. You don't write the code, you just set control properties. When you see the page with view source you see the generated code not the source-code of the aspx page.

jgarcia@tdg-i.com
07-10-2007, 04:08 PM
You put the control and it generates the extjs code for you. You don't write the code, you just set control properties. When you see the page with view source you see the generated code not the source-code of the aspx page.

aaaah, so this is a server side control :) sorry. :)