We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

FILTRO DE COLUMNCHOOSER NO FUNCIONA!


QUE TAL!

ESTOY UTILIZANDO LA OPCIÓN DE COLUMNCHOOSER PERSONALIZADA DE LA SIGUIENTE MANERA:

VIEW:

 <input id="btndef1" onclick="onClick1();" type="button" title="Columns" value="" class="botoncolumn" />

@(Html.EJ().Grid<MISSION>("FlatGrid")
        .CssClass("filtered")
          .Datasource((IEnumerable<PRODUCTS>)ViewBag.ListPos)
          .ShowColumnChooser()
        .....
)

DONDE EL INPUT ES EL BOTÓN CON EL QUE ABRIRÉ EL SELECTOR DE COLUMNAS

JAVASCRIPT:

  function DataBound1(args) {

            var proxy = this;
            setTimeout(function () {
                $(".e-ccButton").addClass("e-hide");       <---------     Oculto el botón por defecto
                proxy.element.css("margin-top", "0px")
            }, 0)

            $('#FlatGrid_toolbarItems').append($('#btndef1'))  <------------  muestro el nuevo botón y lo agrego a la barra de tareas

        }//fin DataBound1

 function onClick1(args) {
            var button = document.getElementById("btndef1");
            var proxy = $("#FlatGrid").ejGrid("instance");
            var top = button.offsetTop, left = button.offsetLeft + 250;
            var dlgWidth = 220;
            if ($("#" + proxy._id + "ccDiv").length && proxy.element.find(".e-ccButton").length) {
                $("#" + proxy._id + "ccDiv").ejDialog({
                    width: '230px',
                    height: '309px',
                    position: {
                        X: (proxy.model.enableRTL ? (left - dlgWidth + 143) : (left - dlgWidth)),   <--------------------------- asigno las propiedades al nuevo botón
                        //Y: top - 110
                        //Y: top + this.element.height() + 10
                        Y: top + 65
                    }
                }).ejDialog("open");
                $("#" + proxy._id + "liScrollerDiv").ejScroller({ height: '228', width: '228', buttonSize: 0 });
                $("#" + proxy._id + "liScrollerDiv").ejScroller('refresh');
            }
        }//fin Onlick1


EL PROBLEMA ESTA AL QUERER UTILIZAR EL FILTRO PARA BUSCAR ALGUNA COLUMNA, NO FUNCIONA, ESTO EL LO ÚNICO QUE FALLA, 
YA QUE SI AGREGA CORRECTAMENTE LAS COLUMNAS.

¿ALGUNA FORMA DE SOLUCIONAR ESTO?

MUCHAS GRACIAS.

1 Reply

VA Venkatesh Ayothi Raman Syncfusion Team February 27, 2017 12:51 PM UTC

Hi Cesar, 
Thanks for contacting Syncfusion support. 

We have unclear about your requirement and we have prepared the sample a based on your code example that you have shared with us and this can be download from following link, 
  
In this sample, we have also enable the filtering and searching. Please refer to the sample and you still face the same issue then could you please provide more details about your requirement? 
It would be helpful for us to find the problem and provide the better solution as earliest. 
Regards, 
Venkatesh Ayothiraman. 


Loader.
Live Chat Icon For mobile
Up arrow icon