Requirements for dynamic column generation in the datagrid: dynamically generates columns based on the selected time range, as shown below:
After selecting a time period, click the 'go' button. how can I modify the column name in the datagrid? Please give me a simple example.
Reply to discussion (solution)
Http://www.iteye.com/topic/1127192
Data-options = "url: 'Get _ salesquantityper. php', singleSelect: true, rownumbers: true"
>
Category
// Include "t. php ";
InitRows1 ($ x1, $ x2); // The initRows1 method is output correctly.
?>
InitRows2 ($ x1, $ x2 );
?>
Use a container to enclose the datagrid container. after the query, clear the datagrid code generated by easyui in the container. easyui does not provide the method to change the columns configuration or deregister the datagrid, you can only remove the datagrid by clearing the container. If the jqgrid you are using provides the function of canceling jqgrid
Click to query
Certificate ('{dvdatagrid'{.html ('
') // Refer to your other post. obtain the columns content using ajax and call $ (' # salesquantityper ') again '). the datagrid () method is used to generate a datagrid object to load the new columns configuration and data.