![]() Optional, percentage value to calculate with Assumes the field value is a percentage value. Uses PHP htmlentities function.ĭisplays mask characters instead of field value, but shows same string length.ĭisplays progressbar based on the field value. If the key not found, displays the field value itself.ĭisplays HTML by converting field value to HTML entities. Optional, separator for the decimal pointĭisplays the data from an array source provided, assumes the field value as the key. You will be able give pseudo-variables to replace it with any value in the row.Įx: '' in the field value will display by replacing 'employee_name' with the real data in that row.ĭisplays the money as specified. The url of the link, the url will be parsed with row data. ![]() If you are not seeing a stylish grid you may have missed to include bootstrap correctly.ĭisplays the anchor link, where you can customize the url based on the field values. Now we will be able to get the html of the datagrid by calling 'render_grid'Īnd you can pass the '$data' array to your view and will be able to print it there $config: The configuration settings for SmartGrid. $columns: The details of the columns to be shown on the grid, if you set the 'auto_generate_columns' to 'true' $sql_or_array: You can pass a MySQl query or a multi-dimensional array with data. Set_grid function takes 3 parameters while the last two are optional. $this->smartgrid->set_grid($sql_or_array, $columns, $config) SmartGrid has 'set_grid' function for that, We will be able to call the functions in it.ġ.First we have to initialize SmartGrid with datasource, column details and optionally with extra configuration. Now we have the SmartGrid library loaded on our controller, The following line will do that pretty well. Let's break the above usage to get more idea on what is happening.įirst thing we do is load the SmartGrid library to the controller, $this->load->view('example_smartgrid', $data) Įcho $grid_html Detailed description of usage Render the grid and assign to data array, so it can be print to on the view ![]() $this->smartgrid->set_grid($sql, $columns) "employee_designation"=>array("header"=>"Designation", "type"=>"label") $columns = array("employee_id"=>array("header"=>"Employee ID", "type"=>"label"), $this->load->library('SmartGrid/Smartgrid')
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |