Deprecated: iconv_set_encoding(): Use of iconv.internal_encoding is deprecated in /home/datamerx/public_html2/jqgrid/jqgrid/libraries/joomla/string/string.php on line 28

Deprecated: iconv_set_encoding(): Use of iconv.input_encoding is deprecated in /home/datamerx/public_html2/jqgrid/jqgrid/libraries/joomla/string/string.php on line 29

Deprecated: iconv_set_encoding(): Use of iconv.output_encoding is deprecated in /home/datamerx/public_html2/jqgrid/jqgrid/libraries/joomla/string/string.php on line 30

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/datamerx/public_html2/jqgrid/jqgrid/libraries/joomla/filter/input.php on line 652

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/datamerx/public_html2/jqgrid/jqgrid/libraries/joomla/filter/input.php on line 652
jqGrid Forums :: Topic: What cell/s should be used for tags or sets? (1/1)
Welcome, Guest
Username: Password: Remember me

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/datamerx/public_html2/jqgrid/jqgrid/libraries/joomla/filter/input.php on line 652
  • Page:
  • 1

TOPIC: What cell/s should be used for tags or sets?

What cell/s should be used for tags or sets? 4 years 6 months ago #22

  • Marmor

  • Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/datamerx/public_html2/jqgrid/jqgrid/libraries/joomla/filter/input.php on line 652
  • Marmor's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
Sorry if this is a FAQ, I'm new to jqgrid and this is my first day with it, so please be kind with me… ;-)

I want to view tags in a cell of jqgrid; how should I do it?

When I write "tags", it means a set of boolean attributes.

There are two types of tagging: free-style (where the user may add any tag he thinks about), and limited.
The first type is easier to implement, and less popular, so my question is about the second.

A good example can be "contact list":
For each contact, possible tags are (for example) Neighbours, Family, Customers, Suppliers, Employees.
For each contact, you may turn on one of them, two, all, or even none of them (depending on the person and his connection to you).
The turned-on tags of each record should be displayed as a list, with only a delimiter between each other (usually "|"), and with an "X" in the up corner of each tag (to turn it off). You can turn on more tags, and it is usually done by popping-up a lookup-table with the tags that are not yet turned on.
Creation of new tags: In some implementations, everybody can do it, and in other implementations – it's limited to privileged users. Sometimes it's done from the above lookup-table, and sometimes it's done from a separate screen.

The server side implementation (in DB) is usually with "join table"; for example, in the above example of contacts, you have one table of contacts where each contact has a unique "contact-ID", a second table of tags (where the tag name is unique), and a third table with two fields – one for the above "contact-ID" and the other for a tag name; to know if a specific tag should be displayed for a specific contact, we check if the third table contains a pair with the contant ID of this contact and the specific tag.

Theoretically, tags can be displayed in jqgrid (or any other table) also as separate boolean columns, where there is a column for any tag (even if it is turned off); But it's not practical, either because there are many tags, and/or because the list of them is dynamic, and/or the ratio between the number of the total tags and the number of the turned-on tags is high.

I'm not afraid to build everything from scratch, but before doing it – I want to check if there is any existing feature for it or anything else which may help me.

Thanks in advance for anybody who responds!
Eli
The administrator has disabled public write access.

What cell/s should be used for tags or sets? 4 years 6 months ago #23

  • positron

  • Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/datamerx/public_html2/jqgrid/jqgrid/libraries/joomla/filter/input.php on line 652
  • positron's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 59
  • Thank you received: 4
  • Karma: 1
You might want to use something like jquery UI Multiselect widget (www.erichynds.com/blog/jquery-ui-multiselect-widget). You can see a demo of how that works here - www.ok-soft-gmbh.com/jqGrid/MultipleCheckboxEdit.htm Check out the "shipped via" column. Looks a lot like what you're trying to do with your tags.

Moreover, the Multiselect widget has been proven to successfully integrate with jqGrid.
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 0.752 seconds