Home › Forum › Omnis General Forum › Undefined datagrid customformat column
-
Undefined datagrid customformat column
Posted by Obonye on October 27, 2024 at 3:07 pmDear All,
I’m working on the sample library jsDataGrid Formatting. I noticed that if I change the list definition from instance variables and instead define it from a sql table class, the data entered into the datagrid columns change to “undefined”. If I tab out of the column entry and back again into the entry column, the previous data entered is visible. If I tab out the entry cell it changes to “undefined”. What could be causing this?
The datagrid object is in a js remote form.
Regards
Martin O.
Andreas Pfeiffer replied 9 months ago 2 Members · 7 Replies -
7 Replies
-
Hi Martin,
Are you using the internal methods, i.e. $select? If so, can you check if the schema class is assigned to the $sqlclassname property and that the schema class has the columns that you expect?
Best,
Andreas
-
Martin,
One more thing.
Is this a user defined grid? If so, make sure that the $columndatacol property of each column fits with the column name of the list column.
Best,
Andreas
-
I have created an instance variable list with it’s subtyped assigned to a table class. Then I call a select statement from the table class to define the list. I right-click on the iList and yes, the columns are correctly defined. The datagrid is userdefined. The columns mode is defined as custom format. I also noticed that is I prefix the column names with the list eg iList.ColName, the undefined error goes away. But if I tab out of the column entry field, what I have entered becomes invisible.
-
I meant to say, if I prefix the $columndatacol with the variable list like this: iList.EmployeeFirstName, the undefined errors goes away. Though I’m not sure if this is the correct way of solving the problem. Now the issue, the data entered disappears in the column entry cell on event after.
-
This reply was modified 9 months ago by
Obonye Mato.
-
should be the column name only.
Best,
Andreas
-
the datagrid object has a $formatcell method:
Calculate <b style=”background-color: var(–bb-content-background-color); font-family: inherit; font-size: inherit; color: var(–bb-body-text-color);”>lValue as <b style=”background-color: var(–bb-content-background-color); font-family: inherit; font-size: inherit; color: var(–bb-body-text-color);”>iList.[<b style=”background-color: var(–bb-content-background-color); font-family: inherit; font-size: inherit; color: var(–bb-body-text-color);”>pRow].[<b style=”background-color: var(–bb-content-background-color); font-family: inherit; font-size: inherit; color: var(–bb-body-text-color);”>pCol]
If pCol<>1
Calculate lValue as jst(lValue,’n2′)
End If
# note, client executed method requires color parameter to be a string unless using a constant. Can alternativley be a HTML color string eg. ‘#FF0000’
If iList.[pRow].iTotal<0
# Calculate iHtml as styledtohtml(con(style(kEscColor,’#FF0000′),style(kEscStyle,kBold),lValue))
Calculate iHtml as styledtohtml(con(style(kEscColor,’rgba(255,0,0,1)’),style(kEscStyle,kBold),lValue))
Else
Calculate iHtml as styledtohtml(con(style(kEscColor,kDarkGreen),style(kEscStyle,kItalic),lValue))
End If
Quit method iHtml
Could this cause an issue with the command Do <b style=”background-color: var(–bb-content-background-color); font-family: inherit; font-size: inherit; color: var(–bb-body-text-color);”>iList.$definefromsqlclass($tables.taPerson)
-
Martin,
I don’t think so. However you can easily test it by omitting this code temporarily and see if it has any effect.
Best,
Andreas
-
-
-
This reply was modified 9 months ago by
-
Log in to reply.