Forum

July 12th, 2025
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
search functionality
20/05/2010
19:14
Avatar
subte
Member
Members
Forum Posts: 3
Member Since:
20/05/2010
sp_UserOfflineSmall Offline

I have the following grid, with the search option enabled, but when I open the search dialog, and click on search button, nothing happens. What and Where should I modify it to work?

    <script type = "text/javascript">
        jQuery(document).ready(function() {
            $("#grid").jqGrid(
        {
            datatype: function() {
                $.ajax(
                {
                    url: "OrdenDeProduccion.aspx/GetOrdenDeProduccion", //PageMethod

                    data: "{'pPageSize':'" + $('#grid').getGridParam("rowNum") +
                    "','pCurrentPage':'" + $('#grid').getGridParam("page") +
                    "','pSortColumn':'" + $('#grid').getGridParam("sortname") +
                    "','pSortOrder':'" + $('#grid').getGridParam("sortorder") + "'}", //PageMethod Parametros de entrada

                    dataType: "json",
                    type: "post",
                    contentType: "application/json; charset=utf-8",
                    complete: function(jsondata, stat) {
                        if (stat == "success")
                            jQuery("#grid")[0].addJSONData(JSON.parse(jsondata.responseText).d);
                        else
                            alert("Error al traer los datos desde json");
                    }
                });
            },
            jsonReader: //Set the jsonReader to the JQGridJSonResponse squema to bind the data.
            {
            root: "Items",
            page: "CurrentPage",
            total: "PageCount",
            records: "RecordCount",
            repeatitems: true,
            cell: "Row",
            id: "Id"
        },
        colModel: //Columns
        [
            { index: 'Id', name: 'Id', width: 10, align: 'Left', label: 'Id', hidden: true },
            { index: 'Fechaentrada', name: 'Fechaentrada', align: 'Center', label: 'Fecha', width: 200},
            { index: 'Horaentrada', name: 'Horaentrada', align: 'Center', label: 'Hora', width: 200 },
            { index: 'Razonsocial', name: 'Razonsocial', align: 'Center', label: 'Cliente', width:200 },
            { index: 'Producto', name: 'Producto', align: 'Center', label: 'Producto', width:200 },
            { index: 'Cantidad', name: 'Cantidad', align: 'Center', label: 'Cantidad', width: 200 },
            { index: 'Simbolo', name: 'Simbolo', align: 'Center', label: 'Simbolo', width:200 },
            { index: 'Precio', name: 'Precio', align: 'Center', label: 'Precio', width: 200 },
            { index: 'Ancho', name: 'Ancho', align: 'Center', label: 'Ancho m.', width: 200 },
            { index: 'Largo', name: 'Largo', align: 'Center', label: 'Largo m.', width: 200 },
            { index: 'Superficie', name: 'Superficie', align: 'Center', label: 'mt2', width: 200 },
        ],
        viewsortcols: true,
        caption: "Tabla de Orden de Producción",
        loadtext: 'Cargando datos...',
        emptyrecords: 'No hay resultados',
        rowNum: 10, // PageSize.
        rownumbers: true,
        rownumWidth: 15,
        gridview: true,
        pager: "#pager", //Pager.
        //sortname: 'Razonsocial',
        viewrecords: true,
        sortorder: "asc",
        width: "760",
        height: "260"
    }).navGrid("#pager", { edit: false, add: false, search: true, del: false });
});

Regards!

24/05/2010
18:10
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

You should do some thinks server side. Download the demo where we have PHP exmaples on this.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 994

Currently Online:
28 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information