Jan 22, 2012, 10:49 AM
[CLOSED] Build Dynamic grid with checkbox selection in div
Dear All,
I want to build grid panel in java script in dynamic mode , I faced 2 problem, first, i can't do multi selection from the grid (I mean I can select only one row) and the second i added combo box to this grid but I can't edit the column that has this combo-box the grid render to the window and the window render to dive, I tried to use "Daniil" solution in this page (http://forums.ext.net/archive/index.php/t-16059.html)
but it return error(Microsoft JScript runtime error: Object doesn't support property or method 'getRowExpander') and return empty row
I want to build grid panel in java script in dynamic mode , I faced 2 problem, first, i can't do multi selection from the grid (I mean I can select only one row) and the second i added combo box to this grid but I can't edit the column that has this combo-box the grid render to the window and the window render to dive, I tried to use "Daniil" solution in this page (http://forums.ext.net/archive/index.php/t-16059.html)
but it return error(Microsoft JScript runtime error: Object doesn't support property or method 'getRowExpander') and return empty row
var clm = new Ext.grid.ColumnModel();
columns: [sm,
{ header: 'الرقم الاكاديمي', width: 100, sortable: true, dataIndex: 'AcademicNumber' },
{ header: 'اسم الطالب', width: 200, sortable: true, dataIndex: 'StudentName' },
{ header: 'المنئأه', width: 160, hidden: true, sortable: true, dataIndex: 'EstablisheName' },
{ header: 'الكلية/المعهد', width: 160, sortable: true, dataIndex: 'CollageName' },
{ header: 'القسم', width: 160, sortable: true, dataIndex: 'DepartmentName' },
{ header: 'التخصص', width: 160, sortable: true, dataIndex: 'SpecializationName' },
{ header: 'أسم المرشد', width: 160, sortable: true, dataIndex: 'GuidanceName' },
{ dataIndex: "CurrentGuidanceType_ID", editor: new Ext.grid.GridEditor(Ext.apply({ field: { id: "cbGudance",
xtype: "combo",editable:true, blankText: "نوع الأرشاد", displayField: "GuidanceTypeName",
forceSelection: true, hiddenName: "cbGudance_Value", mode: "local", queryDelay: 10, triggerAction: "all",
valueField: "GuidanceType_ID", store: stGuidanceType, submitValue: true, editable:true
}
}, {})),
header: "نوع الأرشاد", renderer: SubjectTypRenderer, width: 170
}]
});
var gridWindow = new Ext.Window({
id: "window" ,
renderTo: gridsAreas,
autoScroll: true,
height: 600,
width: 1100,
bodyStyle: "background-color: #fff;",
collapsible: true,
iconCls: "icon-application",
padding: 5,
title: groupsNames[groupNameCount][2],
hidden: true,
modal: false
});
var grid = new Ext.grid.GridPanel({
id: 'grid',
enableDragDrop: true,
ddGroup: "groupGrid",
StripeRows: true,
trackMouseOver: true,
title: groupsNames[groupNameCount][2],
store: creatStor(studantGrupNameArray[i], Fielsd, i, count),
renderTo: gridWindow.getBody(),
cm: clm,
sm:sm,
autoHeight: true,
hidden: false,
tbar: { id: "tb" , xtype: "toolbar", items: [{ id: "tbSaveSatuse_" + i, iconCls: 'icon-disk', text: "حفظ حالة المرشد الجديد", listeners: { click: { fn: SaveGuidanceSatuse}} },
]
},
listeners:
{
render:
{
fn: setDD
}
}
});
SubjectTypRenderer = function (value, e, store, record) {
var r = stGuidanceType.getById(value);
if (value == null || value == '') {
return '<font color=green> نوع الأرشاد</font>';
}
if (r) {
return r.data.GuidanceTypeName;
}
return value;
}
Last edited by Daniil; Jan 25, 2012 at 7:35 AM.
Reason: [CLOSED]