Is there an easy way to add multiple rows at one time in the grid? I know it sounds funny but I have a customer that wants four rows added simultaneously from the add button. They would be empty rows, but the customer wants this ability. Any thoughts?
You can do it using on_insert method with function so:
// this db table will be used for add,edit,delete
$h->table = "My table";
$e["on_insert"] = array("insert_data", null, true);
//Then call function insert_data for on_insert method.
unset($data["params"]["col2"]); //If you don´t wants save nothing in this col
$data["params"]["col3"] = 0; //If you wants 0 for this
$data["params"]["col4"] = ""; /If you wants empty for this
You can also review this demo:
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?