I have a column where enable_edit is INLINE and I can change these values one by one for each row. But I also want an option where I can select all rows and make this change to all the columns in a click of a button.
Or atleast maybe an inline option where I can edit the whole column values when I choose my value.
My Code:
$dg = new C_DataGrid(“select * from approvalstatus”, “Invoice_Number”, “approvalstatus”);
$dg ->enable_autowidth(true)->enable_autoheight(true);
$dg ->set_pagesize(100);
$dg ->set_scroll(true);
$dg ->enable_edit(‘INLINE’);
$dg -> enable_search(true);
$dg -> enable_advanced_search(true);
$dg -> set_row_color(‘lightgreen’,’lightblue’);
$dg -> set_col_edittype(‘Master1_Approval_Status’,’select’,’NULL:NULL;Approved:Approved;Not Approved:Not Approved’, false);
$dg -> set_col_readonly(‘Invoice_Number,Account_Number,Personal_Bill,Personal_Bill_Vat,Company_Bill,Company_Bill_Vat,Master1_Name,Master2_Name,Master2_Approval_Status,Master3_Name, Master3_Approval_Status’);
$dg -> set_caption(“Approval Table”);
$dg -> set_col_title(“Invoice_Number”, “Invoice Number”);
$dg -> set_col_title(“Account_Number”, “Account Number”);
$dg -> set_col_title(“Personal_Bill”, “Personal Bill”);
$dg -> set_col_title(“Personal_Bill_Vat”, “VAT(Personal)”);
$dg -> set_col_title(“Company_Bill”, “Company Bill”);
$dg -> set_col_title(“Company_Bill_Vat”, “VAT(Company)”);
$dg -> set_col_title(“Master1_Name”, “Approver Name”);
$dg -> set_col_title(“Master1_Approval_Status”, “Approval Status”);
$dg -> set_col_title(“Master2_Name”, “Approver Name”);
$dg -> set_col_title(“Master2_Approval_Status”, “Approval Status”);
$dg -> set_col_title(“Master3_Name”, “Approver Name”);
$dg -> set_col_title(“Master3_Approval_Status”, “Approval Status”);
$dg -> set_multiselect(true, true);
$dg -> set_theme(‘cobalt’);
$dg -> display();