jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 36 total)
  • Author
    Posts
  • in reply to: Disable a Column Button Disable a Column Button #25737

    jose Ivan
    Member

    Hi again …. I haven’t resolve this case and I was thinking that you maybe can help me …. I was thinking the perfect scene for example if a value if more than 30 in a column call quantity so the button is avariable in other case I would like that his state is disable .. It is posible ?

    best regards


    jose Ivan
    Member

    Other example it’s a registerID this field doesn’t show but it’s exist in datafield array but not in columntext … so if I would like set a cellvalue of any cell that doesn’t show. In version 2.4 it was working fine.

    in reply to: Export to excel? Export to excel? #9569

    jose Ivan
    Member

    Which it is best way to bind the grid?

    In your example got this .

    var data = generatedata(100);
    var source =
    {
    localdata: data,
    datatype: "array",
    updaterow: function (rowid, rowdata) {
    // synchronize with the server - send update command
    }
    };
    var dataAdapter = new $.jqx.dataAdapter(source);

    In my example i got this =>

    		 var respuesta = $.parseJSON(result.d);
    var source = {
    datatype: "json",
    datafields: [
    { name: 'ready', type: 'boolean' },
    { name: 'isclient', type: 'boolean' },
    { name: 'indice', type: 'int' }
    ],
    id: methods.getID()//return my ID
    };
    $.map(respuesta.result, function (n, i) {
    n.ready = 0; // I set the values of columns that not in my array so I add.
    n.isclient = 0;
    n.indice = i + 1;
    });
    source.localdata = respuesta.result;
    var cantidad = respuesta._datas.length;// I add the other datafields.... this come the server and i don't know the names.
    for (var i = 0; i < cantidad; i++) {
    source.datafields.push({ name: respuesta._datas[i].datafields });
    }
    var dataAdapter = new $.jqx.dataAdapter(source);
    $('#name').jqxGrid({ source: dataAdapter });

    WHen i Try to export the first column type boolean it gives me error

     var u = function (E, B, C, A, G, F, D) {

    this is because “this.element” is undefined. In your example comes pretty well.

    var t = a(this.element);
     u(r, t, true, false, this, s, v);
    in reply to: Export to excel? Export to excel? #9566

    jose Ivan
    Member

    I got a question I added a Column type checkbox but this column doesn’t exist in my dataarray , so when grid has bindinComplete I search this column and i set the value to false. When I try to export when try to searh the column type doesn’t find so it return string.

    To export Do i have to add this column to my object datasource ?

    in reply to: Export to excel? Export to excel? #9565

    jose Ivan
    Member

    I added to your example checkbox column and works fine ! but in my doesn’t work.

    in reply to: Export to excel? Export to excel? #9561

    jose Ivan
    Member

    Hi , I was trying to find the error when i trying to export.

    In your example “Export data” you don’t have a checkbox column and works fine but if you add a checkbox column it gives me error.

    in reply to: Jqx-all gives error!! Jqx-all gives error!! #9360

    jose Ivan
    Member

    Never mind I think the error it’s mine . My bad. Thanks

    in reply to: Export to excel? Export to excel? #9299

    jose Ivan
    Member

    Thanks for reply , when i said “Do i have to configure something ” I mean if I have to change any property because i was reading the documentation and I see this “The last parameter is optional and determines the url of the export server. By default, the exporter is hosted on the jQWidgets website.”

    My projects it’s on ASP.net and it’s kind difficult send u.!!!

    in reply to: Aggregates with empty Grid. Aggregates with empty Grid. #9210

    jose Ivan
    Member

    Can i change the columntype to numeric in cellendedit and initeditor change to textbox?

    in reply to: Aggregates with empty Grid. Aggregates with empty Grid. #9201

    jose Ivan
    Member

    Thanks for reply … the problem it’s that i added some key like ‘+,-,*,/’ so the final user can do operations with strings like “2+2” and validation function it’s solve the string and put 4 .

    if i change the typetextbox to numeric i have to add some code to let writes the keycode.


    jose Ivan
    Member

    HI , thanks for reply.

    i’m doing this way.

      for (var i = 0; i < config.columsDecimal.length; i++) {
    var datafield = config.columsDecimal[i];
    var column = $('#' + config.name).jqxGrid('getcolumn', datafield);
    column.validation = numbervalidation;
    column.initeditor = numberiniteditor;
    column.aggregates = aggregates;
    column.aggregatesrenderer = aggregatesrenderer;
    }

    where config.columsDecimal=[‘column1′,’column2’] ;

    this way i’m doing dynamic columns. I got a class config.So i add the function this way but i got a problem with aggregates and rernder.It’s seem the aggregates it’s a array so in the aggregatesrenderer get the value in the array.

    These are the functions

     var aggregatesrenderer = function (aggregates) {
    var renderstring = aggregates['total_'];
    return '<span style="margin-top: 4px; float: right;"><strong> Total : ' + renderstring + '</strong></span>';
    };
    var aggregates = function (Value, currentValue, column, record) {
    //[{ 'total_': function (Value, currentValue, column, record) {
    if (typeof (currentValue) != 'undefined')
    return parseFloat(currentValue) + parseFloat(Value)
    else if (typeof (Value) != 'undefined')
    return parseFloat(Value)
    else
    return 0
    // }
    // }]
    };

    how can i do the aggregate and aggregaterenderer like other functions…

    in reply to: Test Topic Test Topic #8061

    jose Ivan
    Member

    jose Ivan
    Member

    Hi thanks for reply … well i got this problem in Chrome .. i got the version 20.+++.

    I got six columns with the property columnsresize: true and each one got a width 10 , so when the datagrid it’s ready i do this.

    this.setRenderGrid = function () {
    $ = jQuery.noConflict();
    var a = $("#container").width();
    for (var b = 0; b <= this.numColumns - 1; b++) {
    var c = $(this.grid).jqxGrid("columns").records[b].datafield;
    var d = this.rendersizes[b];
    var e = d * a / 100;
    $(this.grid).jqxGrid("setcolumnproperty", c, "width", e);
    }
    $(this.grid).jqxGrid({
    width: a - 2
    })
    };

    Container it’s a div with width 98% so i resize the div. In the version 2.4.0 this works fine ! i would like to share a image but i don’t know how to attach a image.

    That’s the other part of my code…

    $(migrid.grid).jqxGrid({
    width: "100%",
    source: dataAdapter,
    editable: true,
    altrows: true,
    enablehover: true,
    enabletooltips: true,
    columnsresize: true,
    enableanimations: true,
    keyboardnavigation: true,
    autoheight: true,
    pageable: false,
    columnsresize: true,
    theme: "classic",
    editmode: "selectedcell",
    selectionmode: "singlecell",
    ready: function () {
    migrid.setRenderGrid()
    },
    columns: [{
    text: "",
    columntype: "checkbox",
    width: 10,
    datafield: "ready",
    cellbeginedit: isCellEditable
    },
    ........ others columns
    });

    in reply to: Export to excel? Export to excel? #7927

    jose Ivan
    Member

    thanks for replay.

    I wanna add that my grid is bind by $.ajax in success .

    But it’s works pretty well.

    i sent you!

    in reply to: Export to excel? Export to excel? #7922

    jose Ivan
    Member

    i was searching and the error occurs when i click and the function “_getexportcolor: function (k) {” where k is undefined ? any idea? i update the version 2.4.1 to 2.4.2 so ?

Viewing 15 posts - 1 through 15 (of 36 total)