on 12-01-2014 9:34 AM
I have this table
I bind odata service and get the firts row data. The folowing rows don't have more data. I want the rows 2,3,4 are editable as in the next image.
The table and the colums are editables in the code:
oTable= new sap.ui.table.Table("tableFechaRoja",{
visibleRowCount: 4,
width: '650px',
editable: true,
resizable: true,
flexible: true,
selectionMode: sap.ui.table.SelectionMode.Single,
selectionBehavior: sap.ui.table.SelectionBehavior.Row
});
oTableFechaRoja.addColumn(new sap.ui.table.Column({label:new sap.ui.commons.Label({text: property.name, editable: true,resizable: true, flexible: true}),
template: oControlFechaRoja,
sortProperty: property.name,
filterProperty: property.name,
editable: true,
resizable: true,
flexible: true,
enableColumnReordering:true,
width:'145px'
}));
}
else if(property.name == "DATE"){
oTableFechaRoja.addColumn(new sap.ui.table.Column({
label: property.name,
template: new sap.ui.commons.DatePicker("dateColumn",{
width:'140px',
value: {
path: "DATE",
type: new sap.ui.model.type.Date({pattern: "dd/MM/yyyy"})
you need to make the template control editable. when you make the template control editable then your entire column get the same settings.
in the other hand, if you need rows and not columns, then you need to use a JSON object and set the editable property on each record in your array.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In this example, I made editable column for 4th row, rest are readonly.
I'm not sure it will be helpful or not, to fit for your requirement give a try to change the logic.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.