Author Topic: How to create/generate an empty GRID without data?  (Read 166 times)

jayron35

  • Newbie
  • *
  • Posts: 2
    • View Profile
How to create/generate an empty GRID without data?
« on: November 20, 2019, 01:01:00 pm »
Hi guys,

Please help.
How to create/generate an empty GRID without data?
I want to create a GRID just like in the attachment.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 4193
    • View Profile
Re: How to create/generate an empty GRID without data?
« Reply #1 on: November 20, 2019, 01:05:02 pm »
Set dataModel.data option as empty array [] and set showHeader option to false to hide the header.

jayron35

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: How to create/generate an empty GRID without data?
« Reply #2 on: November 20, 2019, 01:10:52 pm »
What about if I want to create static number of rows with just one data?
Currently, if I create one data, only one field is being created. I want to create a table just like in the second attachment image.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 4193
    • View Profile
Re: How to create/generate an empty GRID without data?
« Reply #3 on: November 21, 2019, 09:02:36 am »
Following data creates one row filled with data and 4 empty rows. Hope it helps.

Code: [Select]
[
{field1: val1, field2: val2,........},
 {}, {}, {}, {}
]