DATA IS NOT DISPLAYED IN THE DATAGRID

Discuss about features you want to see in the next versions of ApPHP DataGrid. Your requests and offers.

Moderators: ne_moj, zewa, vadimako, ne_moj, zewa, vadimako

ukrao_70
Junior
Junior
Posts: 12
Joined: Feb 22nd, '16, 08:39

DATA IS NOT DISPLAYED IN THE DATAGRID

Postby ukrao_70 » Feb 22nd, '16, 09:09

The code is appended below : I am using free version of datagrid for testing & may like to buy a paid one for the advanced options

1. I am not able see any data in the edit mode ( when I click the edit button ). Please help..The datagrid is showing 3 table fields. all are related with primary keys.

2. $dgrid->setTemplates("","",$details_template); -- Can you please explain what is this piece of code for..setTemplates

3. multiple selection in the dropdownlist is also not happening?

thanks in advance..

## *** only relative (virtual) path (to the current document)
define ("DATAGRID_DIR", "../");
define ("PEAR_DIR", "../pear/");

require_once(DATAGRID_DIR.'datagrid.class.php');
require_once(PEAR_DIR.'PEAR.php');
require_once(PEAR_DIR.'DB.php');

## *** creating variables that we need for database connection
include_once('install/config.inc.php');

$db_conn = DB::factory('mysql');
$db_conn -> connect(DB::parseDSN('mysql://'.$DB_USER.':'.$DB_PASS.'@'.$DB_HOST.'/'.$DB_NAME));

## *** put a primary key on the first place
$sql = "SELECT
activity_details1.sl_no,
su_master.su_name as su_id,
activity_master.activity_name as activity_name,
activity_details1.date_from,
activity_details1.date_to,
activity_details1.time_from,
activity_details1.time_to,
activity_details1.vertical_from,
activity_details1.vertical_to,
activity_details1.lateral_from,
activity_details1.lateral_to,
CASE WHEN activity_details1.notam_req = 1 THEN 'Yes' ELSE 'No' END as notam_req,
activity_details1.recd_on,
affected_area_master.affected_id as affected_units,
activity_details1.approved_on,
activity_details1.notam_no
FROM activity_details1
INNER JOIN su_master ON su_master.sl_no= activity_details1.su_id
inner join activity_master ON activity_master.sl_no = activity_details1.activity_name
inner join affected_area_master on affected_area_master.sl_no = activity_details1.affected_units";

## *** set needed options
$debug_mode = true;
$messaging = true;
$unique_prefix = "f_";
$dgrid = new DataGrid($debug_mode, $messaging, $unique_prefix, DATAGRID_DIR);

## *** set data source with needed options
$default_order_field = "su_id";
$default_order_type = "ASC";
$dgrid->dataSource($db_conn, $sql, $default_order_field, $default_order_type);

## *** set layouts: 0 - tabular(horizontal) - default, 1 - columnar(vertical)
$dgrid->setLayouts(array("view"=>"0", "edit"=>"1", "details"=>"1", "filter"=>"1"));
$details_template = "
<table style='border:1px solid #ccc' align='center' width='60%'>
<tr class='class_tr' bgcolor='#fcfaf6'>
<td width='30%' class='class_td' align='center'>{sl_no}</td>
<td width='70%'>
<table border=0>
<tr class='class_tr' bgcolor='#fcfaf6'><td class='class_td class_left' nowrap><b>SL NO:</b> </td><td class='class_td class_left' >{activity_details.sl_no}</td></tr>
<tr class='class_tr' bgcolor='#fcfaf6'><td class='class_td class_left' nowrap><b>SU_ID:</b> </td><td class='class_td class_left' >{activity_details.su_id}</td></tr>
<tr class='class_tr' bgcolor='#fcfaf6'><td class='class_td class_left' nowrap><b>ACTIVITY ID:</b> </td><td class='class_td class_left' >{activity_details.activity_name}</td></tr>
<tr class='class_tr' bgcolor='#fcfaf6'><td class='class_td class_left' nowrap><b>DATE FROM</b> </td><td class='class_td class_left' >{activity_details.date_from}</td></tr>
<tr class='class_tr' bgcolor='#fcfaf6'><td class='class_td class_left' nowrap><b>DATE TO:</b> </td><td class='class_td class_left' >{activity_details.date_to}</td></tr>
<tr class='class_tr' bgcolor='#fcfaf6'><td class='class_td class_left' nowrap><b>TIME FROM</b> </td><td class='class_td class_left' >{activity_details.time_from}</td></tr>
<tr class='class_tr' bgcolor='#fcfaf6'><td class='class_td class_left' nowrap><b>TIME TO</b> </td><td class='class_td class_left' >{activity_details.time_to}</td></tr>
<tr class='class_tr' bgcolor='#fcfaf6'><td class='class_td class_left' nowrap><b>VERTICAL FROM</b> </td><td class='class_td class_left' >{activity_details.vertical_from}</td></tr>
<tr class='class_tr' bgcolor='#fcfaf6'><td class='class_td class_left' nowrap><b>VERTICAL TO</b> </td><td class='class_td class_left' >{activity_details.vertical_to}</td></tr>
<tr class='class_tr' bgcolor='#fcfaf6'><td class='class_td class_left' nowrap><b>LATERAL FROM</b> </td><td class='class_td class_left' >{activity_details.lateral_from}</td></tr>
<tr class='class_tr' bgcolor='#fcfaf6'><td class='class_td class_left' nowrap><b>LATERAL TO</b> </td><td class='class_td class_left' >{activity_details.lateral_to}</td></tr>
<tr class='class_tr' bgcolor='#fcfaf6'><td class='class_td class_left' nowrap><b>AFFECTED UNITS</b> </td><td class='class_td class_left' >{activity_details.affected_units}</td></tr>
<tr class='class_tr' bgcolor='#fcfaf6'><td class='class_td class_left' nowrap><b>RECD ON</b> </td><td class='class_td class_left' >{activity_details.recd_on}</td></tr>
<tr class='class_tr' bgcolor='#fcfaf6'><td class='class_td class_left' nowrap><b>APPROVED ON</b> </td><td class='class_td class_left' >{activity_details.approved_on}</td></tr>
<tr class='class_tr' bgcolor='#fcfaf6'><td class='class_td class_left' nowrap><b>NOTAM REQ</b> </td><td class='class_td class_left' >{activity_details.notam_req}</td></tr>
<tr class='class_tr' bgcolor='#fcfaf6'><td class='class_td class_left' nowrap><b>NOTAM NO.</b> </td><td class='class_td class_left' >{activity_details.notam_no}</td></tr>
</table>
</td>
</tr>
</table>
<br>
<table style='border:1px solid #ccc' align='center' width='60%'>
<tr class='class_tr' bgcolor='#ffffff' id='f_row_1' >
<th class='class_th class_left' bgColor='#e2e0cb'><div style='float:right;'><a class='f_class_a' href='?skin=&amp;f_mode=cancel&amp;f_rid=236&amp;f__ff_countries_name_operator=like&amp;f__ff_regions_name_operator==&amp;f__ff_countries_independent_date_operator==&amp;f__ff_countries_population_operator==&amp;f__ff_selSearchType=0&amp;f__ff_selSearchType=0&amp;f__ff_onSUBMIT_FILTER=search&amp;f_sort_field=1&amp;f_sort_type=DESC&amp;f_page_size=10&amp;f_p=1&amp;f__ff_countries_name_operator=like&amp;f__ff_regions_name_operator==&amp;f__ff_countries_independent_date_operator==&amp;f__ff_countries_population_operator==&amp;f__ff_selSearchType=0&amp;f__ff_selSearchType=0&amp;f__ff_onSUBMIT_FILTER=search&amp;f_sort_field=1&amp;f_sort_type=DESC&amp;f_page_size=10&amp;f_p=1' onClick=\"javascript:window.location.href='http://phpbuilder.awardspace.com/datagrid420/sample3_demo.php?skin=&amp;f_mode=cancel&amp;f_rid=236&amp;f__ff_countries_name_operator=like&amp;f__ff_regions_name_operator==&amp;f__ff_countries_independent_date_operator==&amp;f__ff_countries_population_operator==&amp;f__ff_selSearchType=0&amp;f__ff_selSearchType=0&amp;f__ff_onSUBMIT_FILTER=search&amp;f_sort_field=1&amp;f_sort_type=DESC&amp;f_page_size=10&amp;f_p=1&amp;f__ff_countries_name_operator=like&amp;f__ff_regions_name_operator==&amp;f__ff_countries_independent_date_operator==&amp;f__ff_countries_population_operator==&amp;f__ff_selSearchType=0&amp;f__ff_selSearchType=0&amp;f__ff_onSUBMIT_FILTER=search&amp;f_sort_field=1&amp;f_sort_type=DESC&amp;f_page_size=10&amp;f_p=1'\" title='Back'>Back</a></div></th>
</tr>
</table>
<br><br><br>";
$dgrid->setTemplates("","",$details_template);

## *** allow mulirow operations
$multirow_option = true;
$dgrid->allowMultirowOperations($multirow_option);
$multirow_operations = array(
"delete" => array("view"=>true),
"details" => array("view"=>true)
);
$dgrid->setMultirowOperations($multirow_operations);

## *** set DataGrid caption
$dgrid->setCaption('Sample 3 - <a href=index.php>Back to Index</a>');

## *** set printing option: true(default) or false
$dgrid->allowPrinting(true);
## *** set exporting option: true(default) or false
$dgrid->allowExporting(true);
## *** set sorting option: true(default) or false
$dgrid->allowSorting(true);

## *** set paging option: true(default) or false
/// $paging_option = true;
/// $rows_numeration = false;
/// $numeration_sign = "N #";
/// $dgrid->AllowPaging($paging_option, $rows_numeration, $numeration_sign);
## *** set paging settings
/// $bottom_paging = array("results"=>true, "results_align"=>"left", "pages"=>true, "pages_align"=>"center", "page_size"=>true, "page_size_align"=>"right");
/// $top_paging = array("results"=>true, "results_align"=>"left", "pages"=>true, "pages_align"=>"center", "page_size"=>true, "page_size_align"=>"right");
// $pages_array = array("10"=>"10", "25"=>"25", "50"=>"50", "100"=>"100", "250"=>"250", "500"=>"500", "1000"=>"1000");
/// $default_page_size = 10;
/// $paging_arrows = array("first"=>"|&lt;&lt;", "previous"=>"&lt;&lt;", "next"=>"&gt;&gt;", "last"=>"&gt;&gt;|");
/// $dgrid->SetPagingSettings($bottom_paging, $top_paging, $pages_array, $default_page_size, $paging_arrows);

## *** set filtering option: true or false(default)
$dgrid->allowFiltering(true);



// $fill_from_array = array("DRDO"=>"DRDO", "ISRO"=>"ISRO", "NAVY"=>"NAVY", "IAF"=>"IAF", "CG"=>"CG", "AADC"=>"AADC", "NTRO"=>"NTRO", "NRSC"=>"NRSC", "EFACTOR"=>"EFACTOR", "DECCAN"=>"DECCAN");
//$fill_from_array1 = array("PARA JUMPING"=>"PARA JUMPING", "PARA MOTORING"=>"PARA MOTORING", "PARA GLIDING"=>"PARA GLIDING", "ROCKET LAUNCING"=>"ROCKET LAUNCING", "SURVEY FLIGHT"=>"SURVEY FLIGHT", "NAVAL FIRING"=>"NAVAL FIRING", "IAF EXERCISE"=>"IAF EXERCISE", "UNMANNED BALLOON"=>"UNMANNED BALLOON", "SKY DIVING"=>"SKY DIVING", "FIELD FIRING"=>"FIELD FIRING", "MISSILE LAUNCING" =>"MISSILE LAUNCING", "OTHERS"=>"OTHERS");
$filtering_fields = array(
"SU ID" =>array("table"=>"su_master", "field"=>"su_name", "source"=>"self", "order"=>"ASC", "operator"=>true, "type"=>"dropdownlist", "case_sensitive"=>false, "comparison_type"=>"binary"),
"Activity Name" =>array("table"=>"activity_master", "field"=>"activity_name", "source"=>"self", "order"=>"ASC", "operator"=>true, "type"=>"dropdownlist", "case_sensitive"=>false, "comparison_type"=>"binary"),
"Date From"=>array("type"=>"calendar", "table"=>"activity_details1", "field"=>"date_from", "show_operator"=>"false", "default_operator"=>"=|<|>|like|%like|like%|%like%|not like", "case_sensitive"=>"false", "comparison_type"=>"string|numeric|binary", "width"=>"", "on_js_event"=>""),
"Date To"=>array("type"=>"calendar", "table"=>"activity_details1", "field"=>"date_to", "show_operator"=>"false", "default_operator"=>"=|<|>|like|%like|like%|%like%|not like", "case_sensitive"=>"false", "comparison_type"=>"string|numeric|binary", "width"=>"", "on_js_event"=>""),
);
//"Caption_4"=>array("type"=>"calendar", "table"=>"tableName_3", "field"=>"fieldName_3", "show_operator"=>"false", "default_operator"=>"=|<|>|like|%like|like%|%like%|not like", "case_sensitive"=>"false", "comparison_type"=>"string|numeric|binary", "width"=>"", "on_js_event"=>""),
//"Date From" =>array("table"=>"activity_details1", "field"=>"date_from", "source"=>"self", "operator"=>true, "type"=>"calendar", "case_sensitive"=>false, "comparison_type"=>"binary"),
// "Date To" =>array("table"=>"activity_details1", "field"=>"date_to", "source"=>"self", "operator"=>true, "type"=>"calendar", "case_sensitive"=>false, "comparison_type"=>"binary"),

$dgrid->setFieldsFiltering($filtering_fields);

## *** set columns in view mode
$vm_columns = array(
"su_id" =>array("header"=>"Spl User", "type"=>"label", "width"=>"130px", "align"=>"left", "wrap"=>"nowrap", "text_length"=>"-1", "case"=>"normal"),
"activity_name" =>array("header"=>"Activity Name", "type"=>"linktoedit", "align"=>"left", "width"=>"130px", "wrap"=>"nowrap", "text_length"=>"-1", "case"=>"normal", "summarize"=>false, "on_js_event"=>""),
"date_from" =>array("header"=>"Date From", "type"=>"label", "summarize"=>true, "align"=>"right", "wrap"=>"nowrap", "text_length"=>"-1", "case"=>"normal","summarize"=>false),
"date_to" =>array("header"=>"Date To", "type"=>"label", "summarize"=>true, "align"=>"right", "wrap"=>"nowrap", "text_length"=>"-1", "case"=>"normal","summarize"=>false),
"time_from" =>array("header"=>"Time From","type"=>"label", "align"=>"left", "wrap"=>"wrap", "text_length"=>"15", "case"=>"lower","summarize"=>false),
"time_to" =>array("header"=>"Time To", "type"=>"label", "align"=>"center", "wrap"=>"wrap", "text_length"=>"15", "case"=>"lower","summarize"=>false),
"vertical_from" =>array("header"=>"Vertical From", "type"=>"label", "summarize"=>true, "align"=>"right", "wrap"=>"nowrap", "text_length"=>"-1", "case"=>"normal","summarize"=>false),
"vertical_to" =>array("header"=>"Vertical To", "type"=>"label", "summarize"=>true, "align"=>"right", "wrap"=>"nowrap", "text_length"=>"-1", "case"=>"normal","summarize"=>false),
"lateral_from" =>array("header"=>"Lateral From", "type"=>"label", "summarize"=>true, "align"=>"right", "wrap"=>"nowrap", "text_length"=>"-1", "case"=>"normal","summarize"=>false),
"lateral_to" =>array("header"=>"Lateral To", "type"=>"label", "summarize"=>true, "align"=>"right", "wrap"=>"nowrap", "text_length"=>"-1", "case"=>"normal","summarize"=>false),
"affected_units" =>array("header"=>"Affected Units", "type"=>"label", "summarize"=>true, "align"=>"right", "wrap"=>"nowrap", "text_length"=>"-1", "case"=>"normal","summarize"=>false),
"recd_on" =>array("header"=>"Recd On", "type"=>"label", "summarize"=>true, "align"=>"right", "wrap"=>"nowrap", "text_length"=>"-1", "case"=>"normal","summarize"=>false),
"approved_on" =>array("header"=>"Approved On", "type"=>"label", "summarize"=>true, "align"=>"right", "wrap"=>"nowrap", "text_length"=>"-1", "case"=>"normal","summarize"=>false),
"notam_req" =>array("header"=>"NOTAM ReQ", "type"=>"label", "summarize"=>true, "align"=>"right", "wrap"=>"nowrap", "text_length"=>"-1", "case"=>"normal","summarize"=>false),
"notam_no" =>array("header"=>"NOTAM No", "type"=>"label", "summarize"=>true, "align"=>"right", "wrap"=>"nowrap", "text_length"=>"-1", "case"=>"normal","summarize"=>false),
);
$dgrid->setColumnsInViewMode($vm_columns);

## *** set settings for add/edit/details modes

$fill_from_array = array();
$sql1 = "SELECT sl_no, affected_id FROM affected_area_master ORDER BY affected_id ASC";
$dSet = $dgrid->executeSql($sql1);
while($row = $dSet->fetchRow()){
$fill_from_array[$row[0]] = $row[1];
}
$table_name = "activity_details1"; //,"su_master","activity_master","affected_area_master");
$primary_key = "sl_no";
//$condition = "activity_details1.sl_no = ".$_REQUEST['f_rid'];
$condition = "";
$dgrid->setTableEdit($table_name, $primary_key, $condition);



$em_table_properties = array("width"=>"90%");
$dgrid->SetEditModeTableProperties($em_table_properties);
## *** set details mode table properties
$dm_table_properties = array("width"=>"90%");
$dgrid->SetDetailsModeTableProperties($dm_table_properties);


//$auto_column_in_edit_mode = true;
//$dgrid->SetAutoColumnsInEditMode($auto_column_in_edit_mode);

## *** set columns in edit mode

$mode = isset($_REQUEST['prefix_mode']) ? $_REQUEST['prefix_mode'] : "";

$em_columns = array(
"su_id" =>array("header"=>"Spl User", "type"=>"enum", "source"=>"self", "view_type"=>"dropdownlist", "width"=>"139px", "req_type"=>"rt", "title"=>"Spl User"),
"activity_name" =>array("header"=>"Activity Name", "type"=>"enum", "source"=>"self","view_type"=>"dropdownlist", "width"=>"139px", "req_type"=>"rt", "title"=>"Activity Details"),
"date_from" =>array("header"=>"Date from", "type"=>"date", "width"=>"210px", "req_type"=>"rt", "title"=>"Date from"),
"date_to" =>array("header"=>"Date to", "type"=>"date", "width"=>"210px", "req_type"=>"rt", "title"=>"Date To"),
"time_from" =>array("header"=>"Time From", "type"=>"time", "width"=>"210px", "req_type"=>"rt", "title"=>"Time From"),
"time_to" =>array("header"=>"Time To", "type"=>"time", "width"=>"210px", "req_type"=>"rt", "title"=>"Time To"),
"vertical_from" =>array("header"=>"Vertical From", "type"=>"textbox", "width"=>"210px", "req_type"=>"rt", "title"=>"Vertical From"),
"vertical_to" =>array("header"=>"Vertical To", "type"=>"textbox", "width"=>"210px", "req_type"=>"rt", "title"=>"Vertical To"),
"lateral_from" =>array("header"=>"Lateral From", "type"=>"textarea", "width"=>"500px", "req_type"=>"rt", "title"=>"Lateral From", "edit_type"=>"wysiwyg", "rows"=>"3", "cols"=>"150"),
"lateral_to" =>array("header"=>"Lateral To", "type"=>"textarea", "width"=>"500px", "req_type"=>"rt", "title"=>"Lateral to", "edit_type"=>"wysiwyg", "rows"=>"3", "cols"=>"150"),
"affected_units" =>array("header"=>"Affected Units", "type"=>"enum", "req_type"=>"st", "width"=>"210px", "title"=>"Affected Units", "readonly"=>"false", "maxlength"=>"-1", "default"=>"", "unique"=>"false", "unique_condition"=>"", "on_js_event"=>"", "source"=>$fill_from_array, "view_type"=>"dropdownlist", "multiple"=>"true", "multiple_size"=>"4"),
"recd_on" =>array("header"=>"Received On", "type"=>"date", "width"=>"210px", "req_type"=>"st", "title"=>"Recd On"),
"approved_on" =>array("header"=>"Approved On", "type"=>"date", "width"=>"210px", "req_type"=>"st", "title"=>"Approved On"),
"notam_req" =>array("header"=>"Notam Required?", "type"=>"checkbox", "true_value"=>1, "false_value"=>0, "width"=>"210px", "req_type"=>"sy", "title"=>"Notam Required?"),
"notam_no" =>array("header"=>"Notam Number", "type"=>"textbox", "width"=>"210px", "req_type"=>"st", "title"=>"Notam Number"));

if($mode == "edit"){
$auto_column_in_edit_mode = true;
$dgrid->SetAutoColumnsInEditMode($auto_column_in_edit_mode);
$em_columns['su_id'] = array("header"=>"SU ID","type"=>"textbox","req_type"=>"rt","width"=>"210px", "title"=>"SU ID");
$em_columns['activity_name'] = array("header"=>"Activity Name","type"=>"textbox","req_type"=>"rt","width"=>"210px");
$em_columns['affected_units'] = array("header"=>"Affected Units","type"=>"textbox","req_type"=>"rt","width"=>"210px");
}else if($mode == "details"){
$em_columns['su_id'] = array("header"=>"SU ID","type"=>"textbox","req_type"=>"rt","width"=>"210px", "title"=>"SU ID");
$em_columns['activity_name'] = array("header"=>"Activity Name","type"=>"textbox","req_type"=>"rt","width"=>"210px");
$em_columns['affected_units'] = array("header"=>"Affected Units","type"=>"textbox","req_type"=>"rt","width"=>"210px");
}

//"affected_units"=>array("header"=>"Affected Units", "type"=>"textbox", "width"=>"210px", "req_type"=>"rt", "title"=>"Affected Units"),
//"affected_units"=>array("header"=>"Affected Units", "type"=>"enum", "source"=>"self", "view_type"=>"dropdownlist", "width"=>"139px", "req_type"=>"rt", "title"=>"Affected Units", "multiple"=>"true", "multiple_size"=>"4"),
$dgrid->setColumnsInEditMode($em_columns);


## *** set foreign keys
$foreign_keys = array(
"su_id"=>array("table"=>"su_master", "field_key"=>"sl_no", "field_name"=>"su_id", "view_type"=>"dropdownlist", "order_by_field"=>"su_name", "order_type"=>"ASC"),
"activity_name"=>array("table"=>"activity_master", "field_key"=>"sl_no", "field_name"=>"activity_name", "view_type"=>"dropdownlist", "order_by_field"=>"activity_name", "order_type"=>"ASC"),
"affected_units"=>array("table"=>"affected_area_master", "field_key"=>"sl_no", "field_name"=>"affected_id", "view_type"=>"dropdownlist", "order_by_field"=>"affected_id", "order_type"=>"ASC")
);
$dgrid->setForeignKeysEdit($foreign_keys);

## *** bind the DataGrid and draw it on the screen
$dgrid->bind();

?>

<br><br>
<center><small>Powered by <a href="http://www.apphp.com/php-datagrid/">ApPHP DataGrid Free</a></small></center>
</body>

administrator
Site Admin
Site Admin
Posts: 5990
Joined: Jan 7th, '09, 23:18
Contact:

Re: DATA IS NOT DISPLAYED IN THE DATAGRID

Postby administrator » Feb 22nd, '16, 15:16

Did you try:
$debug_mode = true;

ukrao_70
Junior
Junior
Posts: 12
Joined: Feb 22nd, '16, 08:39

Re: DATA IS NOT DISPLAYED IN THE DATAGRID

Postby ukrao_70 » Feb 23rd, '16, 08:30

yes sir..

The grid is empty. and I tried in the hosting site where no data was shown and the error [SELECT sl_no, affected_id FROM affected_area_master ORDER BY affected_id ASC [nativecode=**]

debug mode results in the local machine :

search sql (total: 8) SELECT activity_details1.sl_no, su_master.su_name as su_id, activity_master.activity_name as activity_name, activity_details1.date_from, activity_details1.date_to, activity_details1.time_from, activity_details1.time_to, activity_details1.vertical_from, activity_details1.vertical_to, activity_details1.lateral_from, activity_details1.lateral_to, CASE WHEN activity_details1.notam_req = 1 THEN 'Yes' ELSE 'No' END as notam_req, activity_details1.recd_on, affected_area_master.affected_id as affected_units, activity_details1.approved_on, activity_details1.notam_no FROM activity_details1 INNER JOIN su_master ON su_master.sl_no= activity_details1.su_id inner join activity_master ON activity_master.sl_no = activity_details1.activity_name inner join affected_area_master on affected_area_master.sl_no = activity_details1.affected_units WHERE 1=1 ORDER BY 2 ASC LIMIT 0, 10

sql: SELECT sl_no, affected_id FROM affected_area_master ORDER BY affected_id ASC

search sql (total: 1) SELECT * FROM activity_details1 WHERE sl_no = '2' ORDER BY sl_no DESC LIMIT 0, 10

POST: Array ( )

GET: Array ( [f_mode] => edit [f_rid] => 2 [f_sort_field] => 2 [f_sort_type] => ASC [f_page_size] => 10 [f_p] => 1 )

t

administrator
Site Admin
Site Admin
Posts: 5990
Joined: Jan 7th, '09, 23:18
Contact:

Re: DATA IS NOT DISPLAYED IN THE DATAGRID

Postby administrator » Feb 24th, '16, 07:08

I don't see you defined $dgrid->SetColumnsInViewMode($vm_columns);

or

$dgrid->SetAutoColumnsInViewMode(true);

ukrao_70
Junior
Junior
Posts: 12
Joined: Feb 22nd, '16, 08:39

Re: DATA IS NOT DISPLAYED IN THE DATAGRID

Postby ukrao_70 » Feb 24th, '16, 10:52

sir,

u can visit at this link : for further clarification
http://aaians.org/ansci/php_datagrid_428/examples/activity_details_search2.php

In my laptop running wamp @ localhost I'm getting the data populated in the datagrid (View Mode). Add mode also working ok. But edit mode shows nothing.. please help.

i have set

$auto_column_in_edit_mode = true;
$dgrid->SetAutoColumnsInEditMode($auto_column_in_edit_mode);

and

$dgrid->setColumnsInEditMode($em_columns);

ne_moj
Master
Master
Posts: 243
Joined: Jan 1st, '16, 14:11

Re: DATA IS NOT DISPLAYED IN THE DATAGRID

Postby ne_moj » Feb 26th, '16, 07:10

Hello ukrao_70.

The problem still remains? I see that the edit mode works.

administrator
Site Admin
Site Admin
Posts: 5990
Joined: Jan 7th, '09, 23:18
Contact:

Re: DATA IS NOT DISPLAYED IN THE DATAGRID

Postby administrator » Feb 26th, '16, 07:11

I see it works now, right?

ukrao_70
Junior
Junior
Posts: 12
Joined: Feb 22nd, '16, 08:39

Re: DATA IS NOT DISPLAYED IN THE DATAGRID

Postby ukrao_70 » Mar 1st, '16, 05:03

hi admin and ne_moj,

In Date filter i have problem. I gives sql error.

1) SELECT activity_details1.sl_no, activity_details1.su_id, activity_details1.activity_name, activity_details1.date_from, activity_details1.date_to, activity_details1.time_from, activity_details1.time_to, activity_details1.vertical_from, activity_details1.vertical_to, activity_details1.lateral_from, activity_details1.lateral_to, CASE WHEN activity_details1.notam_req = 1 THEN 'Yes' ELSE 'No' END as notam_req, activity_details1.recd_on, activity_details1.affected_units, activity_details1.approved_on, activity_details1.notam_no FROM activity_details1 WHERE 1=1 AND ( activity_details1.date_from = '2016-02-29' ) WHERE 1=1 ORDER BY 1 ASC LIMIT 0, 10

[nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE 1=1 ORDER BY 1 ASC LIMIT 0, 10' at line 1]

Please.. thanks in advance..
Last edited by ukrao_70 on Mar 7th, '16, 12:36, edited 1 time in total.

ukrao_70
Junior
Junior
Posts: 12
Joined: Feb 22nd, '16, 08:39

Re: DATA IS NOT DISPLAYED IN THE DATAGRID

Postby ukrao_70 » Mar 1st, '16, 07:17

Please check on this link
http://aaians.org/ansci/php_datagrid_428/examples/activity_details_search2.php

How the add mode works and what is the problem in edit mode.
2. filtering problem in Date from and Date to :

I wish to have the functionality in edit mode as in the add mode please.

Export facility is also not working..

administrator
Site Admin
Site Admin
Posts: 5990
Joined: Jan 7th, '09, 23:18
Contact:

Re: DATA IS NOT DISPLAYED IN THE DATAGRID

Postby administrator » Mar 2nd, '16, 06:29

Sorry, but this a free version and developing of this version has been stopped a long time ago.
We recommend you to purchase paid edition.


Return to “ApPHP DataGrid {future features}”