Skip to Content
avatar image
Former Member

SAPUI5: Drag and Drop, avoiding empty table

Hi,
I'm trying to use drag and drop between two tables. It works fine until i remove the last element from one table to the second one.

The height of <tbody> becomes 0. So I can't drop any items back to the table 1.

I already tried to set the <tbody> - min-height up to 80px but it doesn't change anything.

Further informations:
- using sap.m.table

code-snippet:

  var table = new sap.m.Table("tableGrp" + id,{});
  table.setShowNoData(false);
  table.setModel(this.model);

 var column1 = new sap.m.Column("colGrp1_" + id, { width: "15px" });
 table.addColumn(column1);
 var column2 = new sap.m.Column("colGrp2_" + id, { width: "75px"});
 table.addColumn(column2);


var colItem = new sap.m.ColumnListItem("colItems_" + id, {
type: "Active", 
testpos: "{position}" });

colItem.addStyleClass("midTable");

                
var questionIdentifier = new sap.m.ObjectIdentifier("qIdentifier_" + id, 
{
        title: "{name}",
        text: "{descr}"
});
colItem.addCell(questionIdentifier);
var typeText = new sap.m.Text("typeText2_" + id, { text: "{typename}" });
colItem.addCell(typeText);
(<any>table).bindItems(groupTemp.getModelPath(), colItem);

css code-snippet:

table
{
    min-height: 100px;
}
tbody
{
   min-height: 80px;
}

If i missed any important information, i will add it.

Does anybody know a solution to avoid getting an empty <tbody>?

Thank you very much in advance for your answer,
Jan

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Aug 03 at 03:18 PM

    Did you try to use the noData Property of the Table?

    i.e.:

    noData="Please drag-and-drop products here."

    Add comment
    10|10000 characters needed characters exceeded