Grid export with custom

Hi,
how to custom misc/Export field and how make it work with model relation ex.hasOne and custom grid format

You would need to make your own export. Existing only pills data from a model. I have done it, will share my code with you later.

HI,

Have a look at this Controller

Use is to add anywhere not only in grid or crud

$exp = $v->add(‘Controller_Export’,array(‘output_filename’=>‘Unpaid_Ids_’.date(‘l jS \of F Y h:i:s A’).’.csv’,‘model’=>$any_model,‘fields’=>array(‘name’,‘email’,‘mobile_number’,‘address’,‘sponsor’,‘introducer’,‘left’,‘right’,‘username’,‘created_at’,‘session_left_pv’,‘session_right_pv’,‘total_left_pv’,‘total_right_pv’,‘carried_amount’)));

hope it helps… we add this controller when we have complex model with join and a lot of other expressions that we need in export.

Thanks for this class Gowrav. Really helpfull!

1 Like

thank you @gowravvishwakarma