jQWidgets Forums

Forum Replies Created

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • Hi Peter,
    I tried with virtualdata but it is bringing required amount of data(10-20 records for example) from the data variable present in ajax call success(as an argument).
    But i need to call db for every pagechange event(for 10 records. So i m tring with serverpaging
    I am having following questions regarding serverpaging,
    1.Can we do serverpaging in dot net?Then how to call controller action from view?
    2.Is it supporting jqwidget 2.5 version?
    3.Can we do db call for pagechange event again and again?

    Thanks,
    Rajani

    Hey Peter, U have given one sample in this below url
    http://www.jqwidgets.com/community/topic/initrowdetails-is-not-firing-in-single-click/
    Would you modify these piece of code with your solution.

    or

    Can you please look into my code.I am using rowexpand to call initrowdetails. still not calling the child grid(nestedgridrecords variable) during 2nd click.

    var nestedgridrecords=function (index, parentElement, gridElement, record) {
    debugger;

    $(“#InfoMessages”).html(”);
    var parentsLength = $(“#jqxgridExistingPlatform”).parents().length;
    var jqxgridnestedgridurl = ‘../PlatformAdmin/GetExistingPltfrmsRegionalData’;

    var grid = $($(parentElement).children()[0]);
    //grid .jqxGrid(‘updatebounddata’);
    $.ajax({
    url: jqxgridnestedgridurl, cache: false,
    data: { PlatformModelID: PlatformModelID },
    success: function (data, status, xhr) {
    var jqxGridForNestedGrid = {};
    jqxGridForNestedGrid = data;
    var recordnstd = $(“#jqxgridExistingPlatform”).jqxGrid(‘getrowdata’, index);
    var phid = recordnstd.PHNo;
    var gridnst = $($.find(‘#grid’ + index));
    var datasbyid = $(jqxGridForNestedGrid).find(‘PHNo:’ + phid);
    var datasbyidarr = new Array();
    for (i = 0; i < datasbyid.length; i++) {
    datasbyidarr[i] = $(datasbyid[i]).parent()[i];
    }

    jqxGridForNestedGrid = DateSet(data);

    var ssource = {
    datafields: [{ name: 'PlatformDateID' }, {}],
    datatype: "array",
    localdata: jqxGridForNestedGrid
    }
    ssource = new $.jqx.dataAdapter (ssource);

    if (grid != null) {
    grid.jqxGrid({
    source: ssource,
    theme: theme, width: '96%', autoheight: true, editable: false, altrows: true, enabletooltips: true,
    columns: [

    ]
    });
    }

    }
    });
    }
    $('#jqxgridExistingPlatform').bind('rowexpand', function (event) {
    debugger;

    /* Upto here it is coming but nestedgridrecords(debugger) not going when clicking for 2nd time. */

    $('#jqxgridExistingPlatform').jqxGrid({ initrowdetails: nestedgridrecords });
    //$("#jqxgridExistingPlatform").jqxGrid('updatebounddata');
    });

    $("#jqxgridExistingPlatform").jqxGrid(
    {
    width: '100%',
    //autowidth: true,
    height: 310,
    //autoheight: true,
    source: dataAdapterExistingPlatform,
    editable: true,
    pageable: true,
    altrows: true,
    enabletooltips: true,
    theme: theme,
    enablehover: false,
    selectionmode: 'multiplerows',
    filterable: true,
    sortable: true,
    editmode: 'multiplecellsextended',
    rowdetails: true,
    rowdetailstemplate: { rowdetails: "

    “, rowdetailsheight: 130, rowdetailshidden: true, width: “100%” },
    //initrowdetails: nestedgridrecords,
    autoshowfiltericon: true,
    columns: [

    How will it hit the debugger 2nd time. In grid,I am calling like this

    initrowdetails: nestedgridrecords,

    Need your help peter.

    How will it hit the debugger 2nd time. In grid calling like this

    initrowdetails: nestedgridrecords,

    Need your help peter.

    Once i m expanding the nested grid button its hiting debugger; but when doing 2nd time(after collapse),its not hitting debugger.
    Need help…

    var nestedgridrecords=function (index, parentElement, gridElement, record) {
    debugger;
    var parentsLength = $(“#jqxgridExistingPlatform”).parents().length;
    var jqxgridnestedgridurl = ‘../PlatformAdmin/GetExistingPltfrmsRegionalData’;
    var grid = $($(parentElement).children()[0]);
    grid.bind(‘bindingcomplete’, function (event) {
    if (event.target.id == “grid” + index) {
    grid.jqxGrid(‘beginupdate’);
    var datainformation = grid.jqxGrid(‘getdatainformation’);
    for (var i = 0; i < datainformation.rowscount; i++) {
    var hidden = true;
    grid.jqxGrid('setrowdetails', i, "

    “, 220, hidden);
    }
    grid.jqxGrid(‘endupdate’);
    }
    });
    //grid.jqxGrid(‘updatebounddata’);//not happening
    grid.jqxGrid(‘updatebounddata’);

    $.ajax({
    url: jqxgridnestedgridurl, cache: false,
    data: { PlatformModelID: PlatformModelID },
    success: function (data, status, xhr) {
    var jqxGridForNestedGrid = {};
    jqxGridForNestedGrid = data;
    var recordnstd = $(“#jqxgridExistingPlatform”).jqxGrid(‘getrowdata’, index);

    var gridnst = $($.find(‘#grid’ + index));
    var datasbyid = $(jqxGridForNestedGrid).find(‘PHNo:’ + phid);
    var datasbyidarr = new Array();
    for (i = 0; i < datasbyid.length; i++) {
    datasbyidarr[i] = $(datasbyid[i]).parent()[i];
    }

    var ssource = {
    datafields: [{ name: 'PlatformDateID' },….],
    datatype: "array",
    localdata: jqxGridForNestedGrid
    }

    ssource = new $.jqx.dataAdapter(ssource);

    if (grid != null) {
    grid.jqxGrid({
    source: ssource, theme: theme, width: '96%', autoheight: true, editable: false, altrows: true, enabletooltips: true,
    columns: [

    { text: '', datafield: 'PlatformDateID', width: '0%', hidden: true },
    ………..
    ]
    });
    }

    }
    });
    }
    nestedgridrecords.jqxGrid('updatebounddata');//not happening(ERROR)
    $(“#jqxgridExistingPlatform”).jqxGrid(
    {
    width: ‘100%’,
    //autowidth: true,
    height: 310,
    //autoheight: true,
    source: dataAdapterExistingPlatform,
    editable: true,
    pageable: true,
    altrows: true,
    enabletooltips: true,
    theme: theme,
    enablehover: false,
    selectionmode: ‘multiplerows’,
    filterable: true,
    sortable: true,
    editmode: ‘multiplecellsextended’,
    rowdetails: true,
    rowdetailstemplate: { rowdetails: “

    “, rowdetailsheight: 130, rowdetailshidden: true, width: “100%” },
    initrowdetails: nestedgridrecords,
    autoshowfiltericon: true,

    If you have any sample code please share.

    I have done that.
    We need to change
    if(d==”last”){this.records.push(h)}else{this.records.splice(d,0,h)}
    in jqxgrid.js file
    previously it was
    if(d==”last”){this.records.push(h)}else{this.records.splice(0,0,h)}

    Thanks.

    I want to add just below the selected rows.If i am doing below code the then datas are adding in first two rows(if i am selecting 2 rows for copy) .How can i add just below of the selected row?

    $(“#CopyRow”).jqxButton({ width: ‘110’, height: ’25’ });
    $(“#CopyRow”).bind(‘click’, function () {
    debugger;

    var selectedrowindexs = $(“#jqxgrid”).jqxGrid(‘selectedrowindexes’);
    var selectedrowindex = $(“#jqxgrid”).jqxGrid(‘getselectedrowindex’);
    var id = $(“#jqxgrid”).jqxGrid(‘getrowid’, selectedrowindex);
    var nextrow = id + 1;

    var row = [];
    for (var i = 0; i < selectedrowindexs.length; i++) {
    row[i] = $("#jqxgrid").jqxGrid('getrowdata', selectedrowindexs[i]);

    //$("#jqxgrid").jqxGrid('addrow', null, row, nextrow);
    }
    //$("#jqxgrid").jqxGrid('addrow', null, row);
    for (var j = 0; j < row.length; j++) {
    $("#jqxgrid").jqxGrid('addrow', selectedrowindexs, row[j], nextrow+j);
    }
    });

    Sorry. image is

    Hi Peter, In your example one dropdownlist we can put inside a cell .But i want to put multiple dropdown inside a cell because i want to track more than one values from a cell.

    I am trying to put multiple checkboxes inside a cell.Its happening beacause i am passing html tags from controller.But i can’t able to track the selected checkbox values.Can you please help.

    //Controller

    [HttpGet]
    public JsonResult GDPerhipheralsAdmin()
    {

    List list = new List() {
    new PerhipheralsAdminJqgrid() { Select=true,mcb=” Dvd Writter Dvd Rom CD Writter CD Rom “, PartNumber =”PO10000”, PartDescription = “PO10000Description”,ImagewatchDescription=”PO10000ImageDescription”,AvailbleInImagewatch =true},

    };

    return Json(list, JsonRequestBehavior.AllowGet);

    }

    //View

    $(“#jqxgrid”).jqxGrid(
    {
    width: 950,
    height: 30,
    editable: true,
    source: dataAdapter,
    theme: theme,
    selectionmode: ‘singlecell’,
    autoheight: true,
    selectionmode: ‘multiplerows’,
    columnsresize: true,
    background: ‘red’,
    color: ‘white’,
    //checkboxes: true,
    ready: function (row, e) {
    //debugger;
    rowcount = $(“#jqxgrid”).jqxGrid(‘getdatainformation’).rowscount;
    //var rows = $(“#jqxgrid”).jqxGrid(‘selectedrowindexes’);
    //var rowh = rows.length;
    for (var i = 0; i < rowcount; i++) {
    $('#jqxgrid').jqxGrid('setrowheight', i, 90);
    }

    },
    columns: [
    { text: 'Select All', editable: false, columntype: 'checkbox', width: 70 },
    { text: 'Available In ImageWatch', editable: true, dataField: 'mcb',
    initeditor: function (row, cellvalue, editor) {
    //return " Dvd Writter Dvd Rom CD Writter CD Rom”;
    },
    cellsrenderer: function (cellvalue, cell, rowid, iCol, cellcontent, e, row, columnfield, value, defaulthtml, columnproperties) {
    debugger;
    //I did in 3 ways to track the value but not happening????????
    var checkd = null; //$(rowid). //cellcontent.datafield.mcb
    if (iCol.Checkbox1.Checked == true) {
    checkd += Checkbox1.value + “,”;
    }
    else if (rowid .Checkbox2.Checked) {
    checkd += Checkbox2.value + “,”;
    }
    else if (Checkbox2.Checked) {
    checkd += Checkbox2.value;
    }

    return checkd;
    }, width: 200
    },
    { text: ‘Dell Part Number’, editable: false, columntype: ‘textbox’, dataField: ”, width: 100 },
    { text: ‘Agile Part Type’, editable: false, dataField: ‘AvailbleInImagewatch’, width: 100 },
    { text: ‘Software Type’, editable: false, dataField: ”, width: 120 },
    { text: ‘Agile Description’, editable: false, dataField: ”, width: 160 },
    { text: ‘Brand Name’, dataField: ”, width: 120 },
    { text: ‘Hidden Internal’, dataField: ”, width: 70 },
    { text: ‘Hidden External’, dataField: ”, width: 70 }

    ]
    });

    Is it possible to put listbox having multiple items instead of checkboxes????

    If any changes need to be done inside plugins.Please let me know.

    I can able to take single row data from view to contoller but i want to take every row data.How will i take.?

    Datas are comining like [0]{name and namevalue,age and agevalue,…..},[1]{name and namevalue,age and agevalue,…..},…..
    but i need like[0]{name and namevalue},[1]{age and agevalue},…..,[4]{name and namevalue},[5]{age and agevalue},…..

    name, age properties have been defined in viewmodel.Thats why when its hiting to controller’s method only 2 value is showing what ever has been defined in view model.But in grid those properties are repeated every time.Means for every rows.
    Can you plz help me?

Viewing 13 posts - 1 through 13 (of 13 total)