equate column display

Questionsequate column display
Lynn Lollar asked 7 years ago

I have a status field in my database and it is a 1-no status, 2-invited and 3-accepted.
I want the column to be the meaning and not the number. How can I achieve this?

Thanks.

1 Answers
Amir answered 7 years ago

Lynn,
you should be able to do something like this:

$col["title"] = "status"; // caption of column
$col["name"] = "status"; // grid column name, same as db field or alias from sql
$col["viewable"] = true;
$col["hidden"] = false;
$col["editable"] = true;
$col["edittype"] = "select"; // render as select
$col["editoptions"] = array("value"=>'1:No;2:Invited;3:Accepted');
$cols[] = $col;

Good luck

Your Answer

15 + 0 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?