We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19604 ☆ A M B ☆
    • 179 Posts
    Sorry to bother you guys with such a simple thing:

    I want to change the binary state of a TV inside the MIGX grid with a (double-)click or so (without "right-click > edit > modify the stuff > done"), i.e. toggling the "red X" into a "green checked".

    I am using the renderer "this.renderClickCrossTick" but somehow some fairy dust is missing. :-(
    Can anybody help?

    THANKS!!!
    Oliver [ed. note: mindeffects last edited this post 10 years, 6 months ago.]
      MINDEFFECTS – DESIGN for PRINT, WEB and MEDIA
      http://twitter.com/mindeffects · http://www.facebook.com/mindeffects · http://www.youtube.com/mindeffects/ · skype://mindeffects_oliver
      • 4172
      • 5,888 Posts
      I think, this.renderClickCrossTick does only work for MIGXdb - items and only for the published-field, if I'm right out of my head.

      But you can try to use this.renderSwitchStatusOptions:

      this are the relevant part of the configuration:

          {
            "MIGX_id":6,
            "header":"",
            "dataIndex":"published",
            "width":"",
            "sortable":"false",
            "show_in_grid":"0",
            "renderer":"this.renderSwitchStatusOptions",
            "clickaction":"switchOption",
            "selectorconfig":"",
            "renderoptions":[
              {
                "MIGX_id":1,
                "name":"unpublish",
                "value":1,
                "clickaction":"",
                "handler":"",
                "image":""
              },
              {
                "MIGX_id":2,
                "name":"publish",
                "value":"0",
                "clickaction":"",
                "handler":"",
                "image":""
              }
            ]
          },
      


      don't forget to select the extra-handler this.handleColumnSwitch

        "extended":{
          "migx_add":"Add Event",
          "formcaption":"",
          "update_win_title":"",
          "win_id":"migxevents",
          "maxRecords":5,
          "addNewItemAt":"bottom",
          "multiple_formtabs":"",
          "actionbuttonsperrow":4,
          "winbuttonslist":"",
          "extrahandlers":"this.handleColumnSwitch",
          "filtersperrow":4,
          "packageName":"thapriest",
          "classname":"Images",
          "task":"",
          "getlistsort":"",
          "getlistsortdir":"",
          "use_custom_prefix":"0",
          "prefix":"",
          "grid":"",
          "gridload_mode":1,
          "check_resid":1,
          "check_resid_TV":"",
          "join_alias":"",
          "has_jointable":"yes",
          "getlistwhere":"",
          "joins":"",
          "cmpmaincaption":"",
          "cmptabcaption":"",
          "cmptabdescription":"",
          "cmptabcontroller":"",
          "winbuttons":"",
          "onsubmitsuccess":"",
          "submitparams":""
        },
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!