0

Is it possible to have the jqgrid with a textbox each line, then can pull it in on the export excel? I am using the PHP Jqgrid

This is my code nad I want to add a textbox for each row, like a note. so I can pull it to the report after:

// Set grid caption using the option caption
$grid->setGridOptions(array(
    "caption"=>"Offer Report",
    "sortname"=>"offer_date",
    "hoverrows"=>true,
        "autowidth"=>true,
        "shrinkToFit"=>true,
        "height"=>"100%",
        "toppager"=>true,
    ));
// Change some property of the field(s)

$grid->setColProperty("unit_num", array("label"=>"Unit Number"));
$grid->setColProperty("unit_type", array("label"=>"Unit Type"));
$grid->setColProperty("sqft", array("label"=>"Size"));
$grid->setColProperty("offer_date", array("label"=>"Date", "align"=>"center","sorttype"=>"date", "formatter"=>"date","formatoptions"=>array("newformat"=>"m/d/Y")));
$grid->setColProperty("name", array("label"=>"Agent"));


$grid->setColProperty("list_price", array("label"=>"List Price", "align"=>"right"));

$grid->setColProperty("client", array("label"=>"Client"));


$grid->setColProperty("offer_price", array("label"=>"Offer", "align"=>"right"));


$grid->setColProperty("offer_credit", array("label"=>"Credits", "align"=>"right"));

$grid->setColProperty("broker_name", array("label"=>"Broker"));
$grid->setColProperty("broker_commission", array("label"=>"Commission", "align"=>"right"));


$grid->setColProperty("sf", array("label"=>"$/SF", "align"=>"right"));


$grid->setColProperty("discount", array("label"=>"Discount", "align"=>"right"));

$grid->setColProperty("offer_type", array("label"=>"Offer Type"));
$grid->setColProperty("status", array("label"=>"Status"));

// Enable Inline Filtering
$grid->toolbarfilter = true;

// Enable navigator
$grid->navigator = true;

// Enable excel export
$grid->setNavOptions('navigator', array("excel"=>true,"pdf"=>true,"add"=>false,"edit"=>false,"del"=>false,"view"=>false)); 
$grid->exportfile ='offer_report.xls';
$grid->pdffile ='offer_report.pdf';
// Enjoy
$grid->renderGrid('#grid','#grid_toppager',true, null, null, true,true);
$conn = null;
Lj Pearson
  • 95
  • 2
  • 11

1 Answers1

1

I never used php JqGrid, but you can do one thing, in your loadComplete or GridComplete function you can specify the code for a custom textbox.

look at my previous post where i told this guy about how to append a custom button to each row, same methodology you can use here and then pulling the data for export wouldn't be difficult then.

Adding a custom button in row in jqGrid?

Community
  • 1
  • 1
Piyush Sardana
  • 1,748
  • 4
  • 19
  • 33