Hi,
I am having problem putting a table/grid inside a grid cell and I do not know how to do that?
Can someone please advice?? Thanks a lot! For example how do I put another grid into the codes below items.
title:'Sample',
layout: 'fit',
autoHeight:true,
items:{
xtype:'editorgrid',
store: new Ext.data.Store({
reader: reader,
data: xg.datads
}),
cm: cm4,
autoHeight:true,
viewConfig : {
forceFit:true
},
renderTo: 'editor-grid',
clicksToEdit:1
}
I dont really understand the question, but anyway, for custom cell content you can use the renderer option. Check the ColumnModel docs (http://extjs.com/deploy/dev/docs/?class=Ext.grid.ColumnModel).
Not during render, but you can do it afterwards.
Just render a plain div with a meaningful class (e.g. class="my-checkbox") and after render use:
Ext.select('.my-checkbox').each(function(el) {
var cb = new Ext.form.CheckBox({
renderTo: el,
...
});
});
Non-related:
You've set renderTo on a nested component. You should only use renderTo in the OUTMOST container. If the outmost container is an Ext.Viewport you don't use renderTo at all.
How about to load a grid into another grid cell?
I am still quite confused.
I have manage to put a grid into another grid, but would like to put in into a specific column.
Attached is the code and the screenshot
Non-related:
You've set renderTo on a nested component. You should only use renderTo in the OUTMOST container. If the outmost container is an Ext.Viewport you don't use renderTo at all. TheMSsForum.com >> Csharp >> RPC over TCP - The Microsoft Software Forum:: into a TextBox field of a form for instance (in my case a grid cell), its the .cs-file is sent to the client as to be seen inside a sniffer. http://www.themssforum.com/Csharp/over/HOME |
Hi all,
my outmost component is a Ext.FormPanel.
These are the things I would like to achieve:
1) would like to convert the table into custom renderer and populate into the grid, at the moment i just use hardcode html , which is the right method. refer to the Ext.grid.MyData for my code.
2) would like to know if i can append the radio button inside the datasource using Ext.grid.myData?
Help appreciated a lot
---------------------------------------------------------------------------------
Below is the js code:
/*
* Ext JS Library 2.0
* (c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://extjs.com/license
*/
Ext.onReady(function(){
Ext.QuickTips.init();
// turn on validation errors beside the field globally
Ext.form.Field.prototype.msgTarget = 'side';
var bd = Ext.getBody();
var fm = Ext.form;
var xg = Ext.grid;
var reader= new Ext.data.ArrayReader({}, [
{name: 'sno'},
{name: 'section'},
{name: 'remarks'},
{name: 'amount', type: 'float'},
{name: 'proof'}
//{name: 'psdate', mapping: 'psdate', type: 'date', dateFormat: 'm/d/Y'},
//{name: 'loandate', mapping: 'loandate', type: 'date', dateFormat: 'm/d/Y'}
]);
Ext.grid.myData = [
['1',
' SQL Project: General Database Discussion Boards. Free source code and :: I have placed the serialno field inside a group and used the expression rownumber(datasetname Output to text instead of grid in QA to see the line feed http://sql.codeproject.com/script/Forums/View.aspx?fid=1725&msg=2840282HOME | Archive of Newsgroup microsoft.public.dotnet.framework.aspnet for March :: Working with controls inside a repeater posted by Øyvind Isaksen on Sun, 30 change table cell style in vb code posted by Keith G Hicks on Wed, 19 Mar 2008 http://newsgroups.cryer.info/microsoft/public.dotnet.frame.aspnet/200803/index.htmlHOME | | April | '+
' | '+
' | '+
'| May | | '+
' | | Jun | '+
' | '+
' | | July | | '+
' | | August | | '+
' | | September | '+
' | '+
' | | October | '+
' | '+
' | | November | '+
' | '+
' | | December | '+
' | '+
' | | January | '+
' | '+
' | stuff.mit.edu/afs/sipb/project/dia/src/oldsrc/dia-cvs/ChangeLog:: Uses a hash table to keep track of extra menu items it adds. dia-embedd needs to be include the gnome-print 2001-03-09 Cyrille Chepelov http://stuff.mit.edu/afs/sipb/project/dia/src/oldsrc/dia-cvs/ChangeLogHOME | PureBasic :: View topic - CS-Grid-Gadget: New Release V 2.3 / PB4:: Here is a screenshot of a working grid inside a grid: END UPDATED Save cell changes into Database, if table is linked to a database http://www.purebasic.fr/english/viewtopic.php?t=17586HOME | | February | | | | March | | '+
' | ',
'',0.00,
''],
['2',
'details',
'Mention whether the property is (self occupied/let out) Self Occupied Let Out ',0.00,
'details']
];
var cm = new Ext.grid.ColumnModel([{
id:'sno',
header: "S.No",
dataIndex: 'sno',
width: 50
//editor: new fm.TextField({
// allowBlank: false
//})
},{
id:'section',
header: "Category",
dataIndex: 'section',
//renderer: renderTable,
width: 380
},{
id:'remarks',
header: "Remarks",
dataIndex: 'remarks',
width: 200
},
{
header: "Amount",
dataIndex: 'amount',
width: 100,
align: 'right',
renderer: 'usMoney',
editor: new fm.NumberField({
allowBlank: true,
allowNegative: false,
maxValue: 100000
})
},
{
header: "Proof",
dataIndex: 'proof',
width: 300
}//,
//dateColumn
//loanDateColumn,
]);
cm.defaultSortable = false;
bd.createChild({tag: 'h1', html: ''});
var gridTab = new Ext.FormPanel({
title: 'Main Title',
bodyStyle:'padding:5px',
layout: 'fit',
autoHeight:true,
items:
[{ //1st big
title: 'FormPanel',
autoHeight:true,
defaultType: 'textfield',
buttonAlign:'center',
layoutOnTabChange: true,
layout: 'form',
items:
[{
xtype:'textfield',
fieldLabel: ' Name',
name: 'name'
}, {
xtype:'textfield',
fieldLabel: ' ID',
name: 'id'
},{
xtype:'textfield',
fieldLabel: 'NO',
name: 'no'
},
{
xtype:'tabpanel',
plain:true,
activeTab: 0,
autoHeight:true,
layoutOnTabChange: true,
defaults:{bodyStyle:'padding:10px'},
items: [{
title:'Sub Details',
layout: 'fit',
autoHeight:true,
items:{
xtype:'editorgrid',
store: new Ext.data.Store({
reader: reader,
data: xg.myData
}),
cm: cm,
autoHeight:true,
viewConfig : {
forceFit:true
//getRowClass :
// function(record, rowIndex, p, ds) {
// var xf = Ext.util.Format;
// //p.body = '' + xf.ellipsis(xf.stripTags(record.data.section), 200) + ' ';
// return 'x-grid3-row-expanded';
// }
},
stripeRows: true,
renderTo: 'editor-grid',
clicksToEdit:1
}
}]
}
]
}]
});
gridTab.render(document.body);
Ext.get('next').on('click', function(){ alert("You clicked next button"); });
});
---------------------------------------------------------------------------------
below is the html
Please refer below for the codes and the screenshot:
Red Hat's Rough Recovery From CFO Exit
Windows Live Finds a New, Pre-installed Home |