jQWidgets Forums

jQuery UI Widgets Forums Grid problem editing row details in jqxgrid

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 10 years, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • problem editing row details in jqxgrid #65303

    kathys2151
    Participant

    I can’t figure out how to get my row details fields to be editable. I’m not doing any tricky; my row details info show up fine when loaded from mysql. Other fields in the main grid can be edited without problem. The problem is that clicking on the details info does not allow me editing.

    Here is how I set up my dropdown vendor list:

              	var dropdownListAdapter = new $.jqx.dataAdapter(vendorSource, { autoBind: true, async: false });
             	var vendorSource = [];
             	for (var i=0; i < dropdownListAdapter.records.length; i++) {
             		vendorSource[i] = dropdownListAdapter.records[i]["vendor"];
             	}  
    
    var source =
                {
                     datatype: "json",              
                     datafields: [
                        { name: 'device', type: 'string', sortable: 'true'},    //id or deviceId           
                        { name: 'host', type: 'string', sortable: 'true' },
                        { name: 'description', type: 'string', sortable: 'true' },
                        { name: 'vendor', type: 'dropdownlist', sortable: 'true' }
                    ],
                url: 'data.php',
                ................
                };
    
                var initrowdetails = function (index, parentElement, gridElement, datarecord) {
                  ................
                                    var vendor = "<div style='margin: 10px;'><b>Vendor:</b> " + datarecord.vendor + "</div>";
                   ............
     

    and here is how I initialize my grid:

    $("#jqxgrid").jqxGrid(
                {	
                   source: dataadapter,
                   selectionmode: 'singlecell',
                   editable: 'true',
                   theme: 'darkblue',
                   width: '90%',
                   filterable: true,
                   showfilterrow: true,
                   sortable: true,
                   autoheight: true,
                   pageable: true,
                   virtualmode: false,
                   rendergridrows: function(obj)
                   {
                       return obj.data;    
                   },
                   rowdetails: true,
                   rowdetailstemplate: { 
                      rowdetails: "<div style='margin: 10px;'><ul style='margin-left: 30px;'><li class='title'></li><li>Notes</li></ul><div class='information'></div><div class='notes'></div></div>", rowdetailsheight: 200 
                   },  
                   initrowdetails: initrowdetails,
                   showstatusbar: true,
    			    columns: [
                          { text: 'device', datafield: 'device',  width: '5%', editable: false },             
                          { text: 'host', datafield: 'host',  width:' 22%' },
                          { text: 'Ip Address', datafield: 'ipAddr', width: '8%' },
                          { text: 'Description', datafield: 'description', width: '18%' }               
                   ]
                });       

    Pretty straightforward. I have other fields that I can edit just fine, so I’m wondering why my vendor field cannot be edited?

    problem editing row details in jqxgrid #65307

    Peter Stoev
    Keymaster

    Hi kathys2151,

    I don’t see any code for Editing or enabling editing in the Row Details. Row Details are HTML Element displayed in the Grid. If you want to make custom HTML Element editable, then you would have to implement something custom.

    Best Regards,
    Peter Stoev

    problem editing row details in jqxgrid #65318

    kathys2151
    Participant

    Ok, that’s what I was wondering. Do you have any samples of this? Or am I better off going in a different direction? I get all my data in one mysql select, but don’t want to show 20 columns at once. I liked the way the row details looked, but need to be able to edit all 20 of the columns.
    Thanks for your help.

    problem editing row details in jqxgrid #65332

    Peter Stoev
    Keymaster

    Hi kathys2151,

    Unfortunately, we don’t have samples about custom editing of row’s details.

    Best Regards,
    Peter Stoev

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

You must be logged in to reply to this topic.