Hello,
i want to show data in grid but i some other way i m sending u my code and tell u everything
$grid->render_sql(“select shot_task_id,shotID_new,thumbPath,shotStatus,taskID from shot,shotTaskArtist,plate where shotTaskArtist.projID=shot.projID and shot.projID=’”.$_REQUEST[‘projid’]."’ and shotTaskArtist.shotID_new=shot.shotID and plate.shotID=shot.shotID and plate.projID=’".$_REQUEST[‘projid’]."’ group by shot.shotID asc",“shot_task_id”,“shotID_new,thumbPath,shotStatus,taskStatus,taskID”);
sample.php
var z = new dhtmlXCombo(“combo_zone3”, “alfa3”, 170);
z.loadXML(“common/test.php?projid=<?php echo $projIDs;?>”);
z.attachEvent(“onChange”,function() {
var selected_value=z.getActualValue();
mygrid = new dhtmlXGridObject(‘gridbox’);
mygrid.setImagePath(“dhtmlxGrid/codebase/imgs/”);
mygrid.clearAll(0);
mygrid.setHeader(“Shot,Thumbs,ShotStatus,taskStatus,ani,pnt,dyn,comp,lit,tex,mod,roto,ren,cproj,shd,3dtrack,2dtrack,render,precomp,mpt3d,mpt2d,rig,db”);
mygrid.setColTypes(“ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro”);
// mygrid.setInitWidths(“50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50”);
mygrid.setInitWidths(“50,*”)
mygrid.setColSorting(“str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str”)
mygrid.enableSmartRendering(true)
mygrid.enableMultiselect(true)
mygrid.init();
mygrid.loadXML(“conn.php?projid=”+selected_value);
var dp = new dataProcessor(“conn.php”);
dp.init(mygrid);
})
in the task status column contain i have to show task but not the all example: suppose in my taskstatus contain WIP,AWC,MIT like three task status then it will show WIP like . and also also the remaining column contain i have count the value and show the number how much are in my database .
plz tell me how i display in the grid.
waiting for reply
please reply me as soon as possible
regards
Suraj
You can add beforeRender handler to process extra fields
function my_code($data){
$tasks = $data->get_value(“taskStatus”); //value from db
…
$data->set_value(“taskStatus”,“WIP”); //final value
}
$grid->event->attach(“beforeRender”,my_code);
$grid->render_sql("select shot_task_id,